Add SO_REUSEADDR to socket options

This commit is contained in:
TheKysek 2016-08-03 13:06:09 +02:00
parent eae426a413
commit ad0859f2e7

View File

@ -14,6 +14,7 @@ class Listener(threading.Thread):
self.port = port
self.family = family
self.s = socket.socket(self.family, socket.SOCK_STREAM)
self.s.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1)
self.s.bind((self.host, self.port))
def run(self):