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

fix: close read loop before closing websocket fix #1530 #1535

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

pcriadoperez
Copy link
Collaborator

Problem

When closing the BinanceWebsocket in some cases the websocket will close before the readloop, causing the read loop to return to the user a ClosedConnectionError.

Solution

  • When closing the binanceWebsocket, first the read loop is exited and the websocket is stopped.
  • Remove unnecesary line of setting the ws state to Exiting as it's done already inside _kill_read_loop

@pcriadoperez pcriadoperez self-assigned this Dec 30, 2024
@coveralls
Copy link

Coverage Status

coverage: 68.945% (-0.02%) from 68.96%
when pulling 27e5772 on pcriadoperez:1530
into d8e2ce1 on sammchardy:master.

@carlosmiei carlosmiei merged commit 658f1fb into sammchardy:master Dec 30, 2024
9 of 15 checks passed
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.

3 participants