From 305e9a4307f2a25039b9b519b2dfc1db7a321247 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Tue, 5 Jul 2022 15:28:39 +0200 Subject: [PATCH] Set socket.SO_REUSEADDR, so the server doesn't fail to reboot --- modules/servers.py | 1 + 1 file changed, 1 insertion(+) diff --git a/modules/servers.py b/modules/servers.py index 23c13fa..8726ba6 100644 --- a/modules/servers.py +++ b/modules/servers.py @@ -34,6 +34,7 @@ global makeServer def makeServer(host,port,https): print("Opening " +str(host)+ ":" +str(port)+ " (" +str(https)+ ") ...") serverSocket = socket.socket(socket.AF_INET, socket.SOCK_STREAM) + serverSocket.setsockopt(socket.SOL_SOCKET,socket.SO_REUSEADDR,1) serverSocket.bind((host,port)) if https: proto = False