Skip to content
This repository has been archived by the owner on Sep 3, 2022. It is now read-only.

DataLab UI creating duplicate socket.io connection to server #352

Closed
drewbryant opened this issue May 27, 2015 · 2 comments
Closed

DataLab UI creating duplicate socket.io connection to server #352

drewbryant opened this issue May 27, 2015 · 2 comments
Labels

Comments

@drewbryant
Copy link
Contributor

Found during end-to-end testing that the client/UI will open a second socket.io connection to the server under some circumstances. Not clear on mechanism/trigger for this yet, as Angular is expected to managed the socket.io connection singleton for a given page (and enforce that only a single instance exists at any given point in time).

@drewbryant
Copy link
Contributor Author

After digging into this a bit more, it turns out there is only a single socket.io connection between client-server (good) and that the issue is with socket.io firing duplicate connect and disconnect events. The duplicate connect events cause a socket.io connection to be added a second time to the session (causing the session to see two separate connections instead of one).

Found some reports in the wild of others seeing this issue with socket.io (socketio/socket.io#430, socketio/socket.io#474).

Simple fix for this is to make the server robust to multiple connect / disconnect events for a given socket.io connection; the socket.io connection maintains an id attribute that can be used to uniquely identify each socket.io connection.

@drewbryant
Copy link
Contributor Author

Addressed by #354

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

1 participant