Skip to content

Graceful shutdown of the websocket connection. #448

Open

Description

@markusthoemmes

It seems like to achieve a "normal" shutdown of a websocket connection, one needs to do a dance like:

  1. Send Close message
  2. Wait for receiving a Close message
  3. Actually close the connection

The Close method of today closes the connection immediately, without warning or graceful shutdown. Would it be desirable to have a Shutdown method like golang's http servers, which does the dance explained above for the user?

Activity

  1. ankur0493 commented on Dec 6, 2018

    @ankur0493
    Contributor

    @garyburd Can you please assign this issue to me. I would like to work on it.

  2. ghost
    self-assigned this
    on Dec 10, 2018
  3. Repository owner unassigned on Dec 10, 2018
  4. elithrar commented on Dec 10, 2018

    @elithrar
    Contributor
  5. ankur0493 commented on Dec 11, 2018

    @ankur0493
    Contributor

    Thanks @garyburd. Will soon share the API details.

  6. added 4 commits that reference this issue on Mar 1, 2019
    b710045
    52c75d4
    e8e6ff7
    4b34454
  7. nhooyr commented on Oct 9, 2019

    @nhooyr

    For someone who wants this now, I've implemented it in nhooyr.io/websocket@v1.7.0

    See discussion in coder/websocket#160

  8. jaitaiwan commented on Jun 19, 2024

    @jaitaiwan
    Contributor

    @canelohill @tebuka would be good to get your thoughts on this PR.

  9. usmanovbf commented on Oct 20, 2024

    @usmanovbf

    Hi there! is it still actual?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    ⌂ 换网址