diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-02-27 16:13:53 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-27 16:13:53 (GMT) |
commit | 3af945fbb47600077850dc7fbcdbc323ddd83dd5 (patch) | |
tree | 20e0644a53d4cbb29f156681526cddfb02b6df46 /Lib/multiprocessing/connection.py | |
parent | 96f98d97776992096ad8d4d07e8acf2dfb7ff71c (diff) | |
download | cpython-3af945fbb47600077850dc7fbcdbc323ddd83dd5.zip cpython-3af945fbb47600077850dc7fbcdbc323ddd83dd5.tar.gz cpython-3af945fbb47600077850dc7fbcdbc323ddd83dd5.tar.bz2 |
[3.12] bpo-43952: Fix multiprocessing Listener authkey bug (GH-25845) (GH-115995)
Listener.accept() no longer hangs when authkey is an empty bytes object.
(cherry picked from commit 686ec17f506cddd0b14a8aad5849c15ffc20ed46)
Co-authored-by: Miguel Brito <5544985+miguendes@users.noreply.github.com>
Diffstat (limited to 'Lib/multiprocessing/connection.py')
-rw-r--r-- | Lib/multiprocessing/connection.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/multiprocessing/connection.py b/Lib/multiprocessing/connection.py index dbbf106..d0582e3 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 |