Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 theping_timeout
toNone
; its default is 20 seconds. Slower computers running locally will receive this quite a bit; this is the "heartbeat". Theping_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