niXman / binapi

Binance API C++ implementation
Apache License 2.0
263 stars 88 forks source link

how do we deal with a websocket disconnect ? #61

Closed journeytosilius closed 2 years ago

journeytosilius commented 2 years ago

so I got a subscribe book error: binapi/src/websocket.cpp(195) ec=1, emsg = stream truncated error after a couple of days connected, how do you normally deal with such error and can we auto-reconnect somehow ?

Thanks !

niXman commented 2 years ago

https://github.com/niXman/binapi/issues/52

journeytosilius commented 2 years ago

Thanks, solved it by creating an operator that controls the processes and switches them