Skip to content

Socket.IO v3 refuses to reconnect after server fails and gets up again #295

@rennokki

Description

@rennokki
  • 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 #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:

  1. Run a Socket.IO v3 server (i have a modified fork here: echo-server)
  2. You will see something like this, in the Requests tab under WS, on connect:
    conn1
  3. Close the server. The client will now try to reconnect at the given interval.
  4. Reopen the server, watch for the client to reconnect. Once it reconnects, it should look like this:
    conn2
  5. 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 => {
        //
    });

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions