diff --git a/common/watcher.py b/common/watcher.py index 1a943a6..218e345 100644 --- a/common/watcher.py +++ b/common/watcher.py @@ -24,6 +24,7 @@ class Watcher: try: watcher_sock.sendall(message_json.encode('utf-8') + b'\n') except socket.error: + nothing=False # Handle potential error in sending (e.g., if connection was lost) watcher_sock.close() # Close the current socket to clean up resources watcher_sock = None # Reset sock to ensure reconnection attempt on next call