Skip to content

WebSocket close status and reason not handled #663

Open
@stbjin

Description

@stbjin

When the ws socket gets closed by peer, a closeResponse object is created but never used.
As the peer also is able to specify a close status + reason if would be nice to fetch these as well.

Today an exception is thrown with the message "Connection closed by the server", making it hard to take action as the reason for closure isn't known. My proposal is to throw a custom exception, including the close status, reason and the closeResponse message.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions