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
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
sails.io.js/sails.io.js
Line 1205 in 88b96ea