Skip to content

onResponse hook is not executed when Client close the connection #1099

Open

Description

@untineo

When Client close the connection while the server is processing the request,the onResponse Hook is not executed.
Is the framework designed this way? If so, how should I deal with this situation?

Activity

  1. climba03003 commented on Jun 10, 2025

    @climba03003
    Member

    onResponse hook only execute when the OutgoingMessage is finish or error.

    finish means you have send back the response to client.
    error means the OutgoingMessage is throwing error.

    I believe the aborted request is not in any of the above case.

  2. untineo commented on Jun 11, 2025

    @untineo
    Author

    Thanks for the reply, so do you have any good advice on how to handle this situation? #

  3. untineo commented on Jun 11, 2025

    @untineo
    Author

    and i find the onSend hook is executed, can i use this hook to handle the situation?

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

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions