summaryrefslogtreecommitdiffstats
path: root/Lib/multiprocessing
diff options
context:
space:
mode:
authorMiguel Brito <5544985+miguendes@users.noreply.github.com>2024-02-27 14:57:59 (GMT)
committerGitHub <noreply@github.com>2024-02-27 14:57:59 (GMT)
commit686ec17f506cddd0b14a8aad5849c15ffc20ed46 (patch)
tree03c4fd999b5f62d115fbd3f1a4a1b79574149d0d /Lib/multiprocessing
parent3a72fc36f93d40048371b789e32eefc97b6ade63 (diff)
downloadcpython-686ec17f506cddd0b14a8aad5849c15ffc20ed46.zip
cpython-686ec17f506cddd0b14a8aad5849c15ffc20ed46.tar.gz
cpython-686ec17f506cddd0b14a8aad5849c15ffc20ed46.tar.bz2
bpo-43952: Fix multiprocessing Listener authkey bug (GH-25845)
Listener.accept() no longer hangs when authkey is an empty bytes object.
Diffstat (limited to 'Lib/multiprocessing')
-rw-r--r--Lib/multiprocessing/connection.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py
index 58d697f..b7e1e13 100644
--- a/Lib/multiprocessing/connection.py
+++ b/Lib/multiprocessing/connection.py
@@ -476,8 +476,9 @@ class Listener(object):
'''
if self._listener is None:
raise OSError('listener is closed')
+
c = self._listener.accept()
- if self._authkey:
+ if self._authkey is not None:
deliver_challenge(c, self._authkey)
answer_challenge(c, self._authkey)
return c