Accept ECONNREFUSED for the dropped HttpCloser request (#1133)

Node 26.12.1 (CVE-2026-105481) makes the http agent check a kept-alive
socket for pending data before reusing it. The queued request now sees
the server's EOF, opens a new connection to the closed server and gets
ECONNREFUSED instead of ECONNRESET. Either way the request is dropped.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
BastiaanandClaude Opus 5.5 authored and GitHub committed 2026-10-22 17:14:17 +01:00
1 parent 046f0af705
commit 5d7ecff418
1 file changed
+2 -1
+2 -1
View File
@@ -201,7 +201,8 @@ function serverSuite(proto) {
let response = await request;
assert.equal(response.statusCode, 200, "non-200 response status code");
assert.equal(response.body.toString(), "ok-6", "response content does not match expected");
await assert.rejects(droppedRequest, { code: "ECONNRESET" });
// Node 26.12.1+ discards the closed socket and gets refused on reconnect
await assert.rejects(droppedRequest, { code: /^ECONN(RESET|REFUSED)$/ });
});
it("should abort requests that take too long to respond", async function() {