From ec26b0e964a7d2eef7fb6df799ba1fe2e3d6394d Mon Sep 17 00:00:00 2001 From: Daniel Perna Date: Sat, 10 Mar 2018 17:44:58 +0100 Subject: [PATCH] Setting SO_REUSEADDR on socket --- changelog.txt | 3 +++ configurator.py | 1 + 2 files changed, 4 insertions(+) diff --git a/changelog.txt b/changelog.txt index aefaca0..bd7e216 100644 --- a/changelog.txt +++ b/changelog.txt @@ -1,3 +1,6 @@ +Version 0.2.7 (2018-03-) +- Setting SO_REUSEADDR on socket for proper restarts + Version 0.2.6 (2018-01-31) - Displaying current filename in title (Issue #76) @danielperna84 - Added menu item to open configurator in new tab (Issue #76) @danielperna84 diff --git a/configurator.py b/configurator.py index 023456e..0495cf6 100755 --- a/configurator.py +++ b/configurator.py @@ -4214,6 +4214,7 @@ def main(args): else: Handler = RequestHandler HTTPD = CustomServer(server_address, Handler) + HTTPD.socket.setsockopt(socket.SOL_SOCKET, socket.SO_REUSEADDR, 1) if SSL_CERTIFICATE: HTTPD.socket = ssl.wrap_socket(HTTPD.socket, certfile=SSL_CERTIFICATE,