Skip to content

connect_error not "emitted" on socket object as specified in docs #3734

Closed
@fliespl

Description

@fliespl

You want to:

  • report a bug

Current behaviour

"connect_error" event is not emitted on socket object (on connection failure) as suggested by documentation:
https://ss.codeone.pl/ss-2020-12-22_21-14-08-1608668048.png

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

https://github.com/fliespl/socket.io-fiddle

Only start client - server must be not running (since it's connection error ;) ). As you can see in logs - manager class "error" is emitted, but "connect_error" on socket class is not.

socket.on('connect_error', () => {
  console.log('connect_error -> not working');
});

socket.io.on('error', () => {
  console.log('io error -> working');
});

Expected behaviour

"connect_error" event should be emitted on socket object as mentioned in documentation.

Setup

  • OS: Windows / Linux
  • browser: Chrome / Cli
  • socket.io version: 3.0.4

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions