-
Notifications
You must be signed in to change notification settings - Fork 29.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to detect a broken HTTP/TCP connection #16443
Comments
Questions like this are better directed at the nodejs/help repo (just as an fyi...)
|
My bad, I didn't know about this repo. I'm talking about TCP keep-alive, not HTTP keep-alive 😉 I'm reluctant to use a timeout because I will miss the response and will not be able to tell if the RPC method I called was successful 😕 |
Consider implementing some kind of heartbeat. |
Unfortunately I don't have any control on the HTTP server 😢 AFAIU, TCP is a connected protocol, I would be surprised if it is unable to detect a connection failure… |
You'd be surprised. I'll close this out but if you want to continue the conversation, please move it over to the help repo. |
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/
The text was updated successfully, but these errors were encountered: