Closed shvelo closed 8 years ago
+1
Please! Can you merge this?
I will take a look. It'd be good to have a test case for it though!
I've run into a strange condition, after adding the test for forceNew
, sails.lower was calling the callback twice.
Any objections?
Couple of things:
1) You can already use multiplex: false
to force a new connection.
2) Starting w/ socket.io-client v1.4, sockets connecting to the same namespace always get new connections (see https://github.com/socketio/socket.io/issues/1956). The core sockets hook that Sails uses only listens to the /
namespace, so this will always be the case.
So it doesn't seem like this is a necessary change. If I'm mistaken, let me know how and I'll reconsider.
Support passing forceNew to socket.io to force opening a new connection.
See #53