Skip to content

Issue when reconnect socket #126

Description

@InoueKenta

I have a SPA which using sailjs and vuejs.
I got an issue when trying to reconect after go to a new view.
The issue is that I try to destroy all old listeners and reassign new event listener by using
io.socket.removeAllListeners();

but then I was struggling because the socket still queue old events.
Then I found out that the removeAllListeners(); methods only revoke _raw io object events but not the eventQueue object.

I managed to fix the issue by calling io.socket.eventQueue = {}.
I just wonder why the eventQueue is still remain and should I change it manually

return this;

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions