Selaa lähdekoodia

ignore events before client handshake

Falko Schindler 2 vuotta sitten
vanhempi
säilyke
7c5f32aae5
1 muutettua tiedostoa jossa 1 lisäystä ja 1 poistoa
  1. 1 1
      nicegui/nicegui.py

+ 1 - 1
nicegui/nicegui.py

@@ -105,7 +105,7 @@ async def handle_disconnect(sid: str) -> None:
 @sio.on('event')
 def handle_event(sid: str, msg: Dict) -> None:
     client = get_client(sid)
-    if not client:
+    if not client or not client.has_socket_connection:
         return
     with client:
         sender = client.elements.get(msg['id'])