We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
KeyError
handle_disconnect
1 parent 6f6ba0f commit 8352638Copy full SHA for 8352638
nicegui/client.py
@@ -257,6 +257,8 @@ def handle_disconnect(self, socket_id: str) -> None:
257
In contrast to connect handlers, disconnect handlers are not called during a reconnect.
258
This behavior should be fixed in version 3.0.
259
"""
260
+ if socket_id not in self._socket_to_document_id:
261
+ return
262
document_id = self._socket_to_document_id.pop(socket_id)
263
self._cancel_delete_task(document_id)
264
self._num_connections[document_id] -= 1
0 commit comments