http: do not emit socket errors after complete response#64278
Conversation
|
Review requested:
|
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
|
I fear we need to bake this a bit |
|
removed the baking for lts, given the bug is in 24, we might want to have it fixed there |
|
Landed in 17163ea |
|
@nodejs/http fyi, all socket errors after |
|
Agreed @lpinca - this swallows errors for started but incomplete responses in problematic ways. I think it's an easy fix: we just need to check for I think we have to to preserve reasonable error handling, I'll open a PR to fix ASAP. |
I do check res.completed in my first version of commit but that would cause some tests failed which maybe associated to macos platform difference so I only keep check whether only res exists and I don't remember the details completely now but thanks for continuing to accomplish this |
|
@lpinca should we revert? |
A transport write error can be delivered before a readable event from the same poll cycle. Writable error handling then destroys both sides of the socket before the HTTP parser can consume an already-sent response. Defer native write errors that do not carry protocol-specific details. After pending reads run, suppress the error only when the request write and response parse are both complete. Continue reporting open writes, truncated responses, user destroy errors, and TLS protocol errors. Follow-up to: nodejs#64507 Original PR Refs: nodejs#64278 Fixes: nodejs#64272 Refs:nodejs#64511 Refs: libuv/libuv#5196 Refs: nodejs#64507 (comment) Refs: nodejs#64511 (comment) Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
Fixes: #64272