bpo-43952: Fix multiprocessing Listener authkey bug (GH-25845)

Listener.accept() no longer hangs when authkey is an empty bytes object.
This commit is contained in:
Miguel Brito 2024-02-27 14:57:59 +00:00 committed by GitHub
parent 3a72fc36f9
commit 686ec17f50
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 23 additions and 1 deletions

View file

@ -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