Socket.IO v3 refuses to reconnect after server fails and gets up again
See original GitHub issue- Echo Version: 1.10.0
- Laravel Version: 8.x
- PHP Version: 7.4
- NPM Version: 6.14.6
- Node Version: 14.5.0
Description:
Running on Socket.IO v3, if the server drops connection while the client still tries to reconnect, Echo does not reconnect to the previously connected channels.
I am aware there is PR https://github.com/laravel/echo/issues/290 that aims at Socket.IO v3, but I watched for v2 features that changed in v3 that this package uses, and found none: https://socket.io/docs/v3/migrating-from-2-x-to-3-0
Steps To Reproduce:
- Run a Socket.IO v3 server (i have a modified fork here: echo-server)
- You will see something like this, in the Requests tab under WS, on connect:
- Close the server. The client will now try to reconnect at the given interval.
- Reopen the server, watch for the client to reconnect. Once it reconnects, it should look like this:
- You can clearly see that it did not reconnect to the
private-team.1
channel on reconnection.
The private channel code is:
window.Echo.private('team.1') // for example
.listen('.alert.updated', e => {
//
});
Issue Analytics
- State:
- Created 3 years ago
- Comments:6 (6 by maintainers)
Top Results From Across the Web
No results found
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
Hmm, I’ll re-open this but will try to look into this when I have time for it. Appreciating any help however.
We’ve decided we won’t be investing time anymore into Socket.io since we don’t maintain the laravel-echo-server package. Instead we recommend to use something like https://github.com/beyondcode/laravel-websockets. Sorry for this and thank you for understanding.