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
but then each transports appends it's name again when loaded, so you get duplicate transport names. I'd assume this is in part why I cannot get Node to emit connect_failed in my tests.
I'm not sure whether io.util.merge() works as intended for the transport array, if that array already contains items. Simple test case (for 0.8.4 via npm):
Not this specifically, but I would guess that this issue is related to the reconnect/connect_failed logic (e.g. Socket.redoTransports) not triggering the right events under Node: #311
That one is much more important, since it actually prevents me from verifying that my fallback code works..
Sorry I didn't read that one carefully. Issue 322 is a duplicate of this one.
The result of this issue is quite important as the transport options set are often ignored.
Idea of fix available in issue 322
If you inspect io.transports, you will find that it contains ["websocket", "xhr-polling", "websocket", "xhr-polling"] under Node.
This is because under Node, io.transports contains the names of the supported transports, as added here:
https://github.com/LearnBoost/socket.io-client/blob/master/lib/io.js#L119
but then each transports appends it's name again when loaded, so you get duplicate transport names. I'd assume this is in part why I cannot get Node to emit connect_failed in my tests.
I'm not sure whether io.util.merge() works as intended for the transport array, if that array already contains items. Simple test case (for 0.8.4 via npm):
For arrays like transports, it merges by replacing into the existing structure at the given position. util.merge is used to configure the sockets ( https://github.com/LearnBoost/socket.io-client/blob/master/lib/socket.js#L42 )
The text was updated successfully, but these errors were encountered: