-
Notifications
You must be signed in to change notification settings - Fork 854
Closed
Labels
Description
I'm using a single socket for this application, and this socket can connect to one or many namespaces.
- socket.connect() is called
- The
clientEvent: .connect
event is emitted. - socket.joinNamespace("/foo") is called
- The
clientEvent: .connect
event is emitted again. - socket.joinNamespace("/bar") is called
- The
clientEvent: .connect
event is emitted again.
I would expect the event to only be called once, since the socket is already connected, and I've only just joined another namespace on this existing socket.
The business logic on connect shouldn't run every time a socket joins a namespace, unless there's a way to determine the namespace joined ("or connected to") in the connect event?