BinanceWebSocketApiManager.stop_stream() doesn't stop the stream immediately
See original GitHub issueCheck this or we will delete your issue. (fill in the checkbox with an X like so: [x])
- I have searched for other issues with the same problem or similar feature requests.
Select one:
- Bug
- Feature Request
- Technical Help
- Other
Environment
- Are you using the module on a VPS or other Cloud hosting?
- Are you using the module on a Raspberry Pi?
What kind of internet connection do you have?
cable
Average system load (CPU)
%10
Hardware specification
Operating System? (include version)
- macOS
- Windows
- Linux (include flavour)
Options
- stream_buffer
- process_stream_data
Which endpoint do you connect?
binance.com
Python Version Requirement
- I am using Python 3.6.1 or above
Exact Python Version?
Python 3.8.1
Pip Version?
pip 21.0.1
Dependencies
UNICORN Binance WebSocket API Version?
1.29.0
Description of your issue
stop_stream()
doesn’t stop the related stream immediately. As we can see the code just stops restart.
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 implement delete_listen_key_by_stream_id()
as well as delete_stream_from_stream_list
in it? Maybe both? Just a suggestion.
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (6 by maintainers)
Top Results From Across the Web
Stop stream | Stopstream.co | Watch Free Sports
STOP STREAM - Watch Sports events on StopStream, we broadcasts from other website like usagoals TV, vipbox, drakulastream, fromhot and provide free online...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Just for documentation: https://github.com/oliver-zehentleitner/unicorn-binance-websocket-api/issues/137 depends on the same fix.
@ebp-z thanks for the hint. using
wait_for()
has led to restart of the socket after each timeout. i tested witloop.run_until_complete()
andloop.run_forever()
.But i found out now, that the
loop.stop()
which i tryed in the past, is working withloop.run_forever()
but not withloop.run_until_complete()
what we used till now. i switched it and stop() works now 😃Thanks you!