From 7bbbf956555c9cc5a7572884dcf1b318e98ed36c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20K=C3=BCthe?= Date: Mon, 30 Oct 2023 16:45:24 +0100 Subject: [PATCH] Fix error when closing sockets This occurs when ZeroNet is started and you send a SIGINT signal (for example with CTRL+C). --- src/Ui/UiServer.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Ui/UiServer.py b/src/Ui/UiServer.py index 088208323..74372e7cc 100644 --- a/src/Ui/UiServer.py +++ b/src/Ui/UiServer.py @@ -181,7 +181,8 @@ def stop(self): from Debug import DebugReloader DebugReloader.watcher.stop() - self.server.socket.close() + for socket in self.server.sockets: + socket.stop() self.server.stop() self.running = False time.sleep(1)