You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While trying to produce a list of sockets currently connected to the server I discovered a minor memory leak. When using several namespaces, for some reason each connection to the server creates a new socket instance in each namespace's object, despite only one being required.
When the client disconnects, only the specified namespace's socket object is removed, all the other namespaces are left with an empty socket instance with disconnected == false.
This can be seen by listing a namespaces sockets, connecting to a different namespace, closing, then refreshing the first namespaces sockets list. Quick pseudo example:
I can't help thinking though that it might also be beneficial to not insert the socket object into the other namespaces in the first place. Is this possible or have I mis-understoud how a part of the system works?
Activity
einaros commentedon Oct 31, 2011
Thank you for this. I'll try reproducing and get back to you shortly.
fixes leak socketio#608
einaros commentedon Oct 31, 2011
That ought to cover it.
samlown commentedon Nov 1, 2011
Awesome!
I can't help thinking though that it might also be beneficial to not insert the socket object into the other namespaces in the first place. Is this possible or have I mis-understoud how a part of the system works?
Merge pull request #608 from nkzawa/patch-2
fix: add extension in the package.json main entry (#608)