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 the server restarts, the client losses the connection and doesn't reconnect.
Since a disconnection event is not thrown, there is no way to know that the client disconnected and also if there was, it's unclear as to how to achieve a re-connection.
I've noticed that while connected is true (even if the server went down), webSocket.socket.connected is false (hence it is more accurate).
How can a re-connection be done using this library?
Thanks,
Ofir
The text was updated successfully, but these errors were encountered:
Yes even I am facing this issue. The disconnect event on client side doesn't seem to work correctly. when the server dies or when the server sometimes discards the client sockets (don't know why). These disconnect events are not catched by the client. So there is really no way to know if the connection is still alive. Anybody who can help please?
Create a boolean in FlashSocket and check it at a greater interval than the heartbeat interval using a flash timer.
Set the boolean true every time you receive data from the server and set it to false at the timer interval.
Hence at the timer interval if the client has not received anything from the server then the boolean will be set to false at which point you can call the disconnect function and detect whether the client has disconnected.
Reconnection will also be possible in this case because the boolean will be set to true as soon as data is received from the server and the client will show as reconnected.
When the server restarts, the client losses the connection and doesn't reconnect.
Since a disconnection event is not thrown, there is no way to know that the client disconnected and also if there was, it's unclear as to how to achieve a re-connection.
I've noticed that while connected is true (even if the server went down), webSocket.socket.connected is false (hence it is more accurate).
How can a re-connection be done using this library?
Thanks,
Ofir
The text was updated successfully, but these errors were encountered: