added try clause
This commit is contained in:
parent
f23319b7b8
commit
84278a111c
@ -70,7 +70,10 @@ async def play_card_js(player_id, card_idx):
|
||||
msg = {"type": "message", "fct": "cardPlayed", "card": s, "card_idx": card_idx,
|
||||
"player": player_id, "num_players": len(the_game.players)}
|
||||
for ws in the_game.websockets:
|
||||
try:
|
||||
await ws.send_json(msg)
|
||||
except Exception:
|
||||
the_game.websockets.remove(ws)
|
||||
|
||||
|
||||
@api.route("/player/{player}/play/{card}")
|
||||
|
Loading…
Reference in New Issue
Block a user