Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a watchdog for the heartbeat #601

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

Josef-MrBeam
Copy link

If your client device loose the network connection to the device running the websocket server this will not be detected by the socket client.
This watchdog will be reseted by the heartbeat message (appears every 25 seconds) if the watchdog will not be resetted in a 30 second window the connection can be marked as lost => 1006

Found with OctoPrint, if you connect to the OctoPrint instance with a laptop and this goes to sleep mode for some time (network will be disabled)
After you wake the device again you still see the UI but the websocket connection is not connected anymore.

You can reproduce this by disabling your network on the laptop, wait some time and connect again.

Copy link

@auvipy auvipy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for the patch, can you please add some tests for the change?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants