Skip to content
Discussion options

You must be logged in to vote

Hi @sklibanov312, the ping interval is basically controlled by the reconnect_timeout in ui.run which defaults to 3 seconds. On nicegui.io, however, we set it to 10 seconds. This is the time the server waits for the client to reconnect after the connection got lost, before the client is removed and resources are freed up.

The ping interval is set in nicegui.py like this:

sio.eio.ping_interval = max(app.config.reconnect_timeout * 0.8, 4)
sio.eio.ping_timeout = max(app.config.reconnect_timeout * 0.4, 2)

For a reconnect timeout of 10 seconds the ping interval is 8 seconds, just as you measured empirically.

To reduce t…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by sklibanov312
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2070 on November 23, 2023 15:07.