You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thank you for reporting! If this is an SDK specific issue, we will look into it and get back to you soon. If this is an API related request, report it in our Advanced API Discord instead (use this invite link if it's your first time accessing the Discord).
I believe this is because a 1001 error is not considered an unexpected connection closure and therefore the retry logic would not be triggered. See here on how ConnectionClosedOK errors are handled vs how ConnectionClosedError errors are handled.
Furthermore, your on_close function is only called when you manually close the connection, not on an error.
How often are you seeing this behavior? I will raise this internally with the the team.
Receiving a Close 1001 message from websocket is not triggering the on_close function and the associated retry logic.
Here is my connection snippet:
`
And here is the logging:
2024-08-06 22:53:08 - websockets.client - DEBUG - % sending keepalive ping
2024-08-06 22:53:08 - websockets.client - DEBUG - > PING 8d 71 87 e4 [binary, 4 bytes]
2024-08-06 22:53:08 - websockets.client - DEBUG - < CLOSE 1001 (going away) [2 bytes]
2024-08-06 22:53:08 - websockets.client - DEBUG - = connection is CLOSING
2024-08-06 22:53:08 - websockets.client - DEBUG - > CLOSE 1001 (going away) [2 bytes]
2024-08-06 22:53:08 - websockets.client - DEBUG - = connection is CLOSED
The text was updated successfully, but these errors were encountered: