Skip to content

Commit 5f8e106

Browse files
committed
timelord catch exception on decode
1 parent f5041ca commit 5f8e106

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

src/timelord.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,14 @@ async def _do_process_communication(
261261
self.done_discriminants.append(challenge_hash)
262262
break
263263

264-
if data.decode() == "STOP":
264+
msg = ""
265+
try:
266+
msg = data.decode()
267+
except Exception as e:
268+
log.error(f"Exception while decoding data {e}")
269+
pass
270+
271+
if msg == "STOP":
265272
log.info(f"Stopped client running on ip {ip}.")
266273
async with self.lock:
267274
writer.write(b"ACK")

0 commit comments

Comments
 (0)