Skip to content

Spec support for connection close notification #542

@Ramblurr

Description

@Ramblurr

The Ring spec provides no mechanism for applications to be notified when a client connection is closed. This limitation is particularly relevant for long-lived streaming responses (e.g., Server-Sent Events), where the server may wish to release resources as soon as the client disconnects.

Currently the only way for the streaming server to discover the connection has been closed is to attempt a write to the output stream and catch the failure.

Some servers, such as http-kit (via its AsyncChannel) and Aleph (via manifold streams), already offer this functionality.

This issue is to open a discussion on whether and how the Ring spec could define a standard way for applications to observe the connection closure event.

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