Client don't reconnect after error event
See original GitHub issueIf I setup auth
middleware function, that calls next
with error, I get error
event on the client, without further reconnection attempts.
And if I manually call socket.io.reconnect()
on that error
callback, nothing happens, because socket.io.readyState
is open
so reconnection doesn’t proceed.
Issue Analytics
- State:
- Created 9 years ago
- Comments:6
Top Results From Across the Web
socket.io client can't connect/reconnect reliably - Stack Overflow
The question is, how does one reliably connect/reconnect and/or why don't I get additional connect events? Here's a sample console.log output:
Read more >Client API - Socket.IO
Event : 'reconnect_error'. error <Error> error object. Fired upon a reconnection attempt error. socket.io.on("reconnect_error", (error) => {
Read more >Understanding and Handling Connection Lifetime Events in ...
The OnReconnected event handler in a SignalR Hub can execute directly after OnConnected but not after OnDisconnected for a given client.
Read more >Disconnect Reasons and Error Messages - NetMotion
Error Code State of. Mobility Client Message /Description
1 Graceful disconnect
25 •Failover System is out of memory.
26 •Retry (reconnect) More data.
Read more >Automatic client reconnection - IBM
If you set the MQCNO option, MQCNO_RECONNECT_Q_MGR , do not include other queue managers in the same queue manager group. The client returns...
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
Hi, this is my solution using manual reconnect that is introduced in version 1.2.0
@Ajaxy I think it’s the same, my example is just a new way to manually reconnect that was introduced in version 1.2.0. In my example, I force client to disconnect before reconnect again with another query that I will be used in authorization middleware, it will avoid duplicate socket connections.