Skip to content

Auto-reconnect never fires when connection attempt only emits error #41

@VastBlast

Description

@VastBlast

In Node on Windows (haven't tested elsewhere), if a connection attempt fails before the socket opens, ws emits only error (no close). Our client never schedules another retry, so auto-reconnect stops working and it never reconnects.

You can reproduce this by creating an instance with any backoff, then connect to a WIFI network without an actual internet connection, then connect to a WIFI network with internet, and the script will stop without trying to reconnect, and emit a close event.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions