sammchardy / python-binance

Binance Exchange API python implementation for automated trading
https://python-binance.readthedocs.io/en/latest/
MIT License
5.99k stars 2.2k forks source link

ThreadedWebsocketManager does not reconnect #1129

Open AMilkov opened 2 years ago

AMilkov commented 2 years ago

It looks that the reconnect feature is not implemented in the code for the ThreadedWebsocketManager. Instead asyncio.TimeoutError is silently ignored. https://github.com/sammchardy/python-binance/blob/d76df5674e45ec9dd1ff3f6ba60f589dec153f21/binance/threaded_stream.py#L47-L49

Is this the expected behavior? What is the suggestion for automatic ThreadedWebsocketManager re-connection?

Python: 3.8.10 OS Ubuntu: 20.04.3 LTS python-binance: 1.0.15