Reconnection after explicit disconnection
See original GitHub issueHi
Currently, the lib tries to reconnect after explicit disconnection from the server with “io server disconnect”. According to the socket.io protocol, the lib should not start reconnection for “io server disconnect” and “io client disconnect” reasons.
Even setting up Options.Reconnection
to false in OnDisconnected
event handler doesn`t help, because library starts reconnection before I have received and handled this event.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:2
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Automatic reconnect stopped after explicit connection attempt
Calling connect while the client is reconnecting stops any further reconnection attempts, even after connecting and disconnecting again.
Read more >How can you re-use or reconnect to a socket on the same ...
My question, to restate, is to be able to use the same socket (more importantly the same port) to reconnect after the client...
Read more >OpenVPN is not working if client is reconnected immediately
My problem is the following: If I disconnect and reconnect openvpn client immediately, the connection succeeds, but I cannot access services ...
Read more >SERVICE DISCONNECTION/RECONNECTION
According to the customizing settings, you might need to close the disconnection document explicitly after the reconnection. This is to indicate ...
Read more >The Socket instance (client-side)
In the first two cases (explicit disconnection), the client will not try to reconnect and you need to manually call socket.connect() .
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
There are a lot of changes, I would wait a little bit until the tests are finished and we can guarantee that is stable enough
io server disconnect
io client disconnect
I have fixed it. https://github.com/doghappy/socket.io-client-csharp/commit/08f458776a11c286ec645d29db9a2dbdb2c60c2f
In this commit, I asserted the sequence of events.
When an event occurs, I add the event name to the array, and finally assert their order.
I modified the logic of connection and reconnection, so there is no need to add the
OnDisconnectedInternal
event.me to 😃 , to do this, from a programming point of view, we only need to do this:
In this scenario, can the problem be solved by calling “Dispose()”?