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

Websocket error propagation lacks usability #352

Open
btschwertfeger opened this issue Feb 6, 2025 · 0 comments
Open

Websocket error propagation lacks usability #352

btschwertfeger opened this issue Feb 6, 2025 · 0 comments
Assignees

Comments

@btschwertfeger
Copy link
Owner

When using the Spot websocket client (maybe with the Futures client too), it is not that clear when and why a reconnect is done.

When a reconnect is performed, first, the error is logged via a warning, e.g. keepalive ping timeout; no close frame received or got an exception received 1001 (going away) CloudFlare WebSocket proxy restarting; then sent 1001 (going away) CloudFlare WebSocket proxy restarting (both with traceback). But those are quite useless information when using in an external trading algorithm. Since this is a warning, and reconnect only logs via info level, there is no information about the time of reconnect.

What I propose to improve:

  • Make the logging more sensible, meaning that when a reconnect is done, the successful reconnect should be visible on the same level of logging, as the failure that caused it.
  • When a reconnect is done or a failure which is to be healed via reconnect is occurred, there should be some mechanism that packages using this functionality can react on that, e.g. if the execution channel reconnects, than we have to ensure that all executions, even those that occurred during the reconnect are handled properly.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant