mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
GvR provided solution to the socket rebinding timeout problem.
M PyShell.py M rpc.py M run.py
This commit is contained in:
parent
725bb233b9
commit
8dcdb77132
3 changed files with 6 additions and 7 deletions
|
@ -403,6 +403,7 @@ class RPCClient(SocketIO):
|
|||
|
||||
def __init__(self, address, family=socket.AF_INET, type=socket.SOCK_STREAM):
|
||||
self.sock = socket.socket(family, type)
|
||||
self.sock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
self.sock.bind(address)
|
||||
self.sock.listen(1)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue