You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When we have used the library to connect to an backend and the signal strength is very poor and the backend has terminated the connection, we do not get call back
this.socket.setClosedCallback(new CompletedCallback() {
public void onCompleted(Exception var1) {
}
});
The text was updated successfully, but these errors were encountered:
https://github.com/websockets/ws#how-to-detect-and-close-broken-connections
you need to detect it by yourself, this is called ping pong / heartbeat method, where you send frequent packet e.g every 10 second and if the client does not reply in e.g 5 second you terminate the connection. I hope this help other ppl aswell.
When we have used the library to connect to an backend and the signal strength is very poor and the backend has terminated the connection, we do not get call back
this.socket.setClosedCallback(new CompletedCallback() {
public void onCompleted(Exception var1) {
}
});
The text was updated successfully, but these errors were encountered: