Replies: 1 comment 1 reply
-
there is a there is an event: OnReconnectFailed. it will fired when couldn’t reconnect within reconnectionAttempts for these 2 reasons, it will not automatically reconnect
private static void Socket_OnDisconnected(object sender, string e)
{
if (e == DisconnectReason.IOServerDisconnect)
{
// the disconnection was initiated by the server, you need to reconnect manually
var io = sender as SocketIO;
io.connect();
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I need to keep attempting reconnection in both cases, when connection was lost and after server closes the connection. What would be the best way to know when automatic reconnection won't be attempted (so that I can manually connect instead)? It seems that calling ConnectAsync again when automatic reconnection is happening might lead to multiple sockets being opened.
Thank you!
Beta Was this translation helpful? Give feedback.
All reactions