wip
This commit is contained in:
@@ -24,6 +24,7 @@ class Watcher:
|
|||||||
try:
|
try:
|
||||||
watcher_sock.sendall(message_json.encode('utf-8') + b'\n')
|
watcher_sock.sendall(message_json.encode('utf-8') + b'\n')
|
||||||
except socket.error:
|
except socket.error:
|
||||||
|
nothing=False
|
||||||
# Handle potential error in sending (e.g., if connection was lost)
|
# Handle potential error in sending (e.g., if connection was lost)
|
||||||
watcher_sock.close() # Close the current socket to clean up resources
|
watcher_sock.close() # Close the current socket to clean up resources
|
||||||
watcher_sock = None # Reset sock to ensure reconnection attempt on next call
|
watcher_sock = None # Reset sock to ensure reconnection attempt on next call
|
||||||
|
|||||||
Reference in New Issue
Block a user