Skip to content

Commit 53754de

Browse files
committed
fix: re-add try & catch on listen_for_events
1 parent c11de05 commit 53754de

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

utils.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ def __callback_event(event_id: Events, data: list[bytes], raw_data: list[bytes],
241241
def listen_for_events(s: socket.socket, connection: Connection):
242242
def thread():
243243
while True:
244-
# try:
244+
try:
245245
parts = NetworkUtils.recieve_parts(s)
246246
if parts is None:
247247
if s.type == socket.SOCK_DGRAM:
@@ -255,7 +255,7 @@ def thread():
255255
event_id: Events = Events.from_value(event_id_str)
256256

257257
NetworkUtils.__callback_event(event_id, sep_parts[1:], raw_parts[1:], connection)
258-
# except Exception as e:
259-
# Terminal.error(f"error at listen_for_events: {e}.")
258+
except Exception as e:
259+
Terminal.error(f"error at listen_for_events: {e}.")
260260

261261
threading.Thread(target=thread, daemon=True).start()

0 commit comments

Comments
 (0)