Closed djdjoko closed 8 months ago
I observed the same behavior. Question is does such a case really happen running in a data center? One could also handle socket states with systemd running on debian..
As far as I know, tcp, http, and websocket levels don't have mechanisms to "trigger" something when a disconnect happens. For websocket, we can test whether a connection is broken or not by using ping/pong. You can change the ping/pong intervals here: https://github.com/crypto-chassis/ccapi/blob/develop/include/ccapi_cpp/ccapi_session_options.h.
I am testing the reconnect feature after the internet has dropped using
market_data_simple_subscription
example by switching my wifi connection off. In ccapi_service, thevoid onFail
function should be triggered but that never happens. When I switch on the Wifi, the data is not received anymore, nor is it trying to reconnect. Any suggestions how to fix this?Thanks