Enhanced server error handling
Add signal handling for when the process is killed
This commit is contained in:
@@ -86,6 +86,12 @@ class WorkerServer:
|
||||
self.client_count -= 1
|
||||
logger.info("close connection")
|
||||
continue
|
||||
except Exception as e:
|
||||
sock.close()
|
||||
sockets.remove(sock)
|
||||
self.client_count -= 1
|
||||
logger.error(e)
|
||||
continue
|
||||
|
||||
logger.trace(f"server received request: {request}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user