tpool: Windows compatibility, fix ResourceWarning. Thanks to Victor Stinner
https://github.com/eventlet/eventlet/pull/167 Signal socket bind to 127.0.0.1, '' does not work on Windows sock.close() to fix ResourceWarning with python3 -Wd
This commit is contained in:
@@ -257,11 +257,12 @@ def setup():
|
||||
_setup_already = True
|
||||
|
||||
sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
sock.bind(('', 0))
|
||||
sock.bind(('127.0.0.1', 0))
|
||||
sock.listen(1)
|
||||
csock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
csock.connect(sock.getsockname())
|
||||
_wsock, _addr = sock.accept()
|
||||
sock.close()
|
||||
_rsock = greenio.GreenSocket(csock)
|
||||
|
||||
_reqq = Queue(maxsize=-1)
|
||||
|
Reference in New Issue
Block a user