fix: Allow address reuse in server.py

This commit is contained in:
2025-10-31 10:09:08 +01:00
parent e9d358d1e5
commit ade17801a0

View File

@@ -32,6 +32,7 @@ class QuietSystemInfoHandler(SystemInfoHandler):
if self.path != '/stats': if self.path != '/stats':
super().log_message(format, *args) super().log_message(format, *args)
socketserver.TCPServer.allow_reuse_address = True
with socketserver.TCPServer(('', PORT), QuietSystemInfoHandler) as httpd: with socketserver.TCPServer(('', PORT), QuietSystemInfoHandler) as httpd:
print("serving at port", PORT) print("serving at port", PORT)
try: try: