Open yufeng0528 opened 6 years ago
Hey @yufeng0528 , reconnection should be handled by btfwss automatically. Check out the latest version, which should have any issues with this function fixed.
Cheers, Nils
thanks for your reply you mean that
if wss.conn and wss.conn.connected.is_set():
time.sleep(5)
else:
wss = wss.reset()
time.sleep(10)
is useless ? i will verify it
Any news guys?
2018-09-27 14:01:38,751 - btfxwss.connection - INFO - Connection opened
2018-09-27 14:01:38,752 - btfxwss.connection - INFO - Connection Error - filedescriptor out of range in select()
2018-09-27 14:01:38,752 - websocket - ERROR - close status: 31522
2018-09-27 14:01:38,753 - btfxwss.connection - INFO - Connection is closed by Bitfinex.
2018-09-27 14:01:38,754 - btfxwss.connection - INFO - Attempting to connect again in 10 seconds.
2018-09-27 14:01:50,118 - btfxwss.connection - INFO - Connection opened
2018-09-27 14:01:50,119 - btfxwss.connection - INFO - _on_open(): Connection reconnected, re-subscribing..
2018-09-27 14:01:50,119 - btfxwss.connection - INFO - Connection Error - filedescriptor out of range in select()
2018-09-27 14:01:50,119 - websocket - ERROR - close status: 31522
2018-09-27 14:01:50,120 - btfxwss.connection - INFO - Connection is closed by Bitfinex.
2018-09-27 14:01:50,122 - btfxwss.connection - INFO - Attempting to connect again in 10 seconds.
2018-09-27 14:02:00,666 - btfxwss.connection - INFO - Connection opened
2018-09-27 14:02:00,666 - btfxwss.connection - INFO - Connection Error - filedescriptor out of range in select()
2018-09-27 14:02:00,667 - websocket - ERROR - close status: 31522
2018-09-27 14:02:00,667 - btfxwss.connection - INFO - Connection is closed normally.
and when the connection is close got unlimited print as below
what's wrong with my code, or right way to reconnect?