Added sock REUSE option

This commit is contained in:
Amazed 2019-02-26 15:19:43 +01:00
parent c0a19f7e3d
commit 6058f8050f

View File

@ -14,6 +14,7 @@ def main():
print("Listening on", listen_ip, 27900)
querysock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
querysock.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
querysock.bind((listen_ip, 28900))
print("Listening on", listen_ip, 28900)
querysock.listen(5)