-
-
Notifications
You must be signed in to change notification settings - Fork 164
BinanceWebSocketApiManager.stop_stream() doesn't stop the stream immediately #161
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
Comments
No it does not just stops a restart. |
Yes, and when does the stream stop after activating? |
the stream loop in the socket class (own threads) is checking if there is a new request every round. as mentioned here i want to try a new way to stop streams with |
implementing
|
Yeah, makes sense: |
Just for documentation: #137 depends on the same fix. |
I dont know whats the right or working way to solve this. Has someone an idea or a hint? |
since it awaits here until data is arrived or connection is closed: you can close websocket or use |
@ebp-z thanks for the hint. using But i found out now, that the Thanks you! |
…1 (comment) and preparing 1.30.0
Check this or we will delete your issue. (fill in the checkbox with an X like so: [x])
Select one:
Environment
What kind of internet connection do you have?
Average system load (CPU)
Hardware specification
Operating System? (include version)
Options
Which endpoint do you connect?
Python Version Requirement
Exact Python Version?
Pip Version?
Dependencies
UNICORN Binance WebSocket API Version?
Description of your issue
stop_stream()
doesn't stop the related stream immediately. As we can see the code just stops restart.https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/blob/c975d49486f93761bbeb01e5a87ff9d4302129f6/unicorn_binance_websocket_api/unicorn_binance_websocket_api_manager.py#L3171
So we need to wait till next
heartbeat/ping-pong
. Maybe this is the design choice but the function name is a little bit confusing then. Maybe we rename it to:stop_restart_stream()
? Or we can implementdelete_listen_key_by_stream_id()
as well asdelete_stream_from_stream_list
in it? Maybe both? Just a suggestion.The text was updated successfully, but these errors were encountered: