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

Resolving the Disconnect Message #250

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

rbrisita
Copy link
Contributor

@rbrisita rbrisita commented Apr 18, 2024

This resolves #127. The 01OS will print the 'Cannot call "receive" once a disconnect message has been received.' message because the ping of the websockets.connect call does not set the ping_timeout to None; its default is 20 seconds. Slower computers running locally will receive this quite a bit; this is the "heartbeat". The ping_interval is the "keepalive" ping that could also be turned off but I personally haven't had a real issue with it yet.

Thinking about it though, I am not sure either is really needed as their functionality is to close stale connections to allow other users to connect like web pages or Internet services. The 01OS, when ran locally, is only expecting one single connection and ideally would be idle until a request would come in and in my view it would be intermittently. A tried request would error out regardless to alert the user.

Tested on:
Debian 11 (aarch64)
Python 3.11.19

Resources:
https://websockets.readthedocs.io/en/stable/topics/timeouts.html

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.

Cannot call "receive" once a disconnect message has been received.
1 participant