The first OnReconnectAttempt will not trigger when reconnecting
See original GitHub issueHi,
OnReconnectAttempt
invokes only for the second connection attempt, so it can be a few seconds delay between the client receives OnDisconnected
and OnReconnectAttempt
events. It would be helpful if reconnection event is invoked as soon as the reconnection starts.
Pull request #183
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
Why does the reconnect function not trigger on manual ...
The first one is that you ensure that you're handling the reconnection logic and the second is the you're handling the connection error...
Read more >Releases · doghappy/socket.io-client-csharp
fix: first OnReconnectAttempt will not triggered when reconnecting · fix: incorrect disconnect reason.
Read more >when reconnecting, disconnect event is triggered after ...
Describe the bug after establishing connect, cut down network of client side for 5~8 seconds, and then recover network, you will see the ......
Read more >Client API
In the first two cases (explicit disconnection), the client will not try to reconnect and you need to manually call socket.connect() .
Read more >Reconnect if disconnected
I do have "Reconnect automatically" selected in profile but it does not seem to work as if I simply choose disconnect from menu...
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
yeah, at the same time we can delete these codes?
~if (Attempts == 0)~ ~{~ ~_reconnectionDelay = Options.ReconnectionDelay;~ ~}~ ~else~ if (Attempts > 0) { OnReconnectAttempt?.Invoke(this, Attempts); }
yep, it should fix the issue! Just one note, it seems we should also add
_reconnectionDelay = Options.ReconnectionDelay;
to this place because it will not work inConnectAsync
ifAttempts
will start from 1. Or just move it before loop begining inConnectAsync