@chaudhariapurva You have to implement auto reconnection to keep the connection alive and connection can be broken for many reasons such as your network issue.
for any one who views this post, you will need to poll the heartbeat using timer(timeout 3-5 sec) and re initiate connection if failure of connection ,after that u will need to re subscribe to the tickers(at least in my case).
@chaudhariapurva That is correct. You should expect one (1-byte) heart beat per second. If you haven't received any packets in say 5 seconds, you should assume your connection is gone.
you will need to poll the heartbeat using timer(timeout 3-5 sec) and re initiate connection if failure of connection ,after that u will need to re subscribe to the tickers(at least in my case).