Procházet zdrojové kódy

ignore events before client handshake

Falko Schindler před 2 roky
rodič
revize
7c5f32aae5
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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'])