bitrich-info/xchange-stream

What happens when websocket gets disconnected?

Closed this issue · 3 comments

So I am streaming data from binance I wonder what happens when it disconnects by accident. Is a throwable gonna be throne? Is the library gonna try to reconnect or do I need to do something about it?
Thanks

It reconnects itself automatically.

You might miss messages while the connection is down, though. The order book for Binance will resynchronize itself automatically, but not all exchange implementations do the same thing. You need to build in resilience in other ways if you can't risk missing trades, for example.

Closing - question answered