From 88369b1243fbabc63d6028d85aa87d0919a5948d Mon Sep 17 00:00:00 2001 From: Nova Cat Date: Mon, 9 Dec 2024 21:58:05 -0800 Subject: [PATCH] fix bad file descriptor --- server.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server.py b/server.py index d87080d..ac81952 100644 --- a/server.py +++ b/server.py @@ -65,8 +65,9 @@ def session(connection, client): while True: try: data = connection.recv(2048) - except: - print("Disconnected.") + except Exception as ex: + cause = "Read error: " + str(ex) + break print("Received data: {}".format(data)) try: textt = data.decode()