Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -576,16 +576,16 @@ async def handle_user_input(websocket,key, process, connected):
|
|
576 |
else:
|
577 |
# First player starts a new game.
|
578 |
pass
|
579 |
-
except
|
580 |
# Send an "error" event if the move was illegal.
|
581 |
await error(websocket, str(exc))
|
582 |
continue
|
583 |
break
|
584 |
except websockets.ConnectionClosed:
|
585 |
-
|
586 |
break
|
587 |
except Exception as e:
|
588 |
-
|
589 |
pass
|
590 |
|
591 |
def process_input(user_input, process):
|
|
|
576 |
else:
|
577 |
# First player starts a new game.
|
578 |
pass
|
579 |
+
except Exception as exc:
|
580 |
# Send an "error" event if the move was illegal.
|
581 |
await error(websocket, str(exc))
|
582 |
continue
|
583 |
break
|
584 |
except websockets.ConnectionClosed:
|
585 |
+
print("WebSocket connection closed")
|
586 |
break
|
587 |
except Exception as e:
|
588 |
+
print(f"Error in input thread: {str(e)}")
|
589 |
pass
|
590 |
|
591 |
def process_input(user_input, process):
|