Setting SO_REUSEADDR on socket

This commit is contained in:
Daniel Perna 2018-03-10 17:44:58 +01:00
parent 82a2b9b2f3
commit ec26b0e964
2 changed files with 4 additions and 0 deletions

View file

@ -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

View file

@ -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,