engine.io-client icon indicating copy to clipboard operation
engine.io-client copied to clipboard

Why engine.io never try the second transport

Open SijieDingEsna opened this issue 8 years ago • 0 comments

Note: for support questions, please use one of these channels: stackoverflow or slack

You want to:

  • [x] report a bug I have a socket.io server which apply socket.io + express and it only supports websocket. If transports is set as ['polling', 'websocket'] in client side, engine.io-client always try polling infinity and never try websocket.
  • [ ] request a feature

Current behaviour

Steps to reproduce (if the current behaviour is a bug)

Expected behaviour

Once the socket.io server side return status 400 and the payload is {"code":0,"message":"Transport unknown"}. The client side should be smart enough to try the second protocol. Because your document suggestion is polling is at first and the default transports is ['polling', 'websocket']. So I think under such transport setting of client, engine.io-client should be tolerable enough to handle such condition.

Setup

  • OS:
  • browser:
  • engine.io version:

Other information (e.g. stacktraces, related issues, suggestions how to fix)

SijieDingEsna avatar Jul 26 '17 18:07 SijieDingEsna