Skip to content

http: do not emit socket errors after complete response - #64278

Merged
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Archkon:http
Jul 12, 2026
Merged

http: do not emit socket errors after complete response#64278
nodejs-github-bot merged 1 commit into
nodejs:mainfrom
Archkon:http

Conversation

@Archkon

@ArchkonArchkon commented Jul 4, 2026

Copy link
Copy Markdown

Fixes: #64272

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/http
  • @nodejs/net

@nodejs-github-botnodejs-github-bot added http Issues or PRs related to the http subsystem. needs-ci PRs that need a full CI run. labels Jul 4, 2026
Signed-off-by: Archkon <180910180+Archkon@users.noreply.github.com>
@mcollinamcollina added the baking-for-lts PRs that need to wait before landing in a LTS release. label Jul 5, 2026
@mcollina

Copy link
Copy Markdown
Member

I fear we need to bake this a bit
or it might cause regressions.

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollinamcollina added the request-ci Add this label to start a Jenkins CI on a PR. label Jul 5, 2026
@github-actionsgithub-actionsBot removed the request-ci Add this label to start a Jenkins CI on a PR. label Jul 5, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Comment threadlib/_http_client.js
Comment threadlib/_http_client.js
@Archkon

This comment was marked as spam.

@mcollinamcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@mcollinamcollina added commit-queue Add this label to land a pull request using GitHub Actions. and removed baking-for-lts PRs that need to wait before landing in a LTS release. labels Jul 12, 2026
@mcollina

Copy link
Copy Markdown
Member

removed the baking for lts, given the bug is in 24, we might want to have it fixed there

@nodejs-github-botnodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Jul 12, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 17163ea into nodejs:mainJul 12, 2026
74 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in 17163ea

@lpinca

lpinca commented Jul 12, 2026

Copy link
Copy Markdown
Member

@nodejs/http fyi, all socket errors after req.res exists are now swallowed. I think this should be semver-major.

@pimterry

pimterry commented Jul 14, 2026

Copy link
Copy Markdown
Member

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 res.completed. @mcollina your note before merging in #64272 mentioned this specifically as a concern, is there a reason you decided to leave it & merge instead? Not sure if I'm missing something.

I think we have to to preserve reasonable error handling, I'll open a PR to fix ASAP.

@Archkon

This comment was marked as spam.

@mcollina

Copy link
Copy Markdown
Member

@lpinca should we revert?

@mcollinamcollina added dont-land-on-v22.x PRs that should not land on the v22.x-staging branch and should not be released in v22.x. dont-land-on-v24.x PRs that should not land on the v24.x-staging branch and should not be released in v24.x. dont-land-on-v26.x PRs that should not land on the v26.x-staging branch and should not be released in v26.x. labels Jul 14, 2026
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dont-land-on-v22.xPRs that should not land on the v22.x-staging branch and should not be released in v22.x.dont-land-on-v24.xPRs that should not land on the v24.x-staging branch and should not be released in v24.x.dont-land-on-v26.xPRs that should not land on the v26.x-staging branch and should not be released in v26.x.httpIssues or PRs related to the http subsystem.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New ECONNRESET error on http.request for HTTP 413 (Node v24.16.0 regression)

6 participants

@Archkon@nodejs-github-bot@mcollina@lpinca@pimterry@jasnell