Pretty sure reactor implements IReactorSocket on Windows on Python 3, but that's

still not enough for this functionality to work (and it might be a Twisted bug).
This commit is contained in:
Itamar Turner-Trauring 2021-05-05 12:59:06 -04:00
parent da5c38b7ca
commit 4ff8a2a09c

View File

@ -405,7 +405,7 @@ class SameProcessStreamEndpointAssigner(object):
:return: A two-tuple of (location hint, port endpoint description) as
strings.
"""
if IReactorSocket.providedBy(reactor):
if sys.platform != "win32" and IReactorSocket.providedBy(reactor):
# On this platform, we can reliable pre-allocate a listening port.
# Once it is bound we know it will not fail later with EADDRINUSE.
s = socket(AF_INET, SOCK_STREAM)