Merge pull request #1053 from andkit/fix-1043
Set reuse address option (fixes #1043)
This commit is contained in:
commit
0041b5de57
@ -296,6 +296,7 @@ def get_port(address, port):
|
||||
"""
|
||||
s = socket.socket()
|
||||
try:
|
||||
s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
|
||||
s.bind((address, port))
|
||||
s.listen(-1)
|
||||
except socket.error:
|
||||
|
Loading…
Reference in New Issue
Block a user