Skip to content

How to detect a broken HTTP/TCP connection #16443

Description

@julien-f

Hi,

My use case: I have a long HTTP request and I want to get an error when the connection fails instead of waiting indefinitely.

I tried to use keepAlive to help detecting whether the connection is up or not but it does not seem to be working.

Is there anything I'm missing?

Test repo: https://github.com/julien-f/socket-keepalive-tests/

Activity

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

    questionIssues asking questions about Node.js.wrong repoIssues that should be opened in another repository.

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions