wisespace-io / binance-rs

Rust Library for the Binance API

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to handle disconnect after 24 hour?

jpmediadev opened this issue · comments

A single connection is only valid for 24 hours; expect to be disconnected at the 24 hour mark

the event_loop() is locked at let message = socket.0.read_message()?;

connection disappears silently and don't receive a Message::Close() signal
how do you solve this gap?

solution: mark keep_running to false on timer and bail! from event_loop()