Skip to content

Why engine.io never try the second transport #5090

Closed
@SijieDingEsna

Description

@SijieDingEsna

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

You want to:

  • 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)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpackage:engine.io-clientThis concerns the "engine.io-client" package

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions