I am getting frequently(after every 15-20 min) disconnected from the WebSocket. I have subscribed for around 150 token for websocket. Is it the problem on your side or my side?
Hi @Shreyas,
You try reconnecting to ticker server once in onDisconnect calback, if fails try after 5 seconds, if fails you try after 5*2 seconds and third time 5*3.
Basically 5*n time interval for every n th retry.
Can you print exception stacktrace and check?
No Exception is raised! The callback method
tickerProvider.setOnDisconnectedListener(new OnDisconnect() {
@Override
public void onDisconnected() {
// your code goes here
System.out.println("i got disconnected"+ Calendar.getInstance());
}
});
gets called and I stop receiving data.
But I did not get you. Could you explain in simpler terms ?
You try reconnecting to ticker server once in onDisconnect calback, if fails try after 5 seconds, if fails you try after 5*2 seconds and third time 5*3.
Basically 5*n time interval for every n th retry.