From c775001466861eda14c037c8bc02706222e62fd5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bartek=20Iwa=C5=84czuk?= Date: Thu, 8 Jun 2023 20:32:26 +0200 Subject: chore(ext/node): revert changes to ClientRequest.onSocket (#19426) Partially reverts https://github.com/denoland/deno/pull/19340 because it causes hangs in some situations. --- cli/tests/unit_node/http_test.ts | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'cli/tests/unit_node/http_test.ts') diff --git a/cli/tests/unit_node/http_test.ts b/cli/tests/unit_node/http_test.ts index 6b0228274..8f87b1fd2 100644 --- a/cli/tests/unit_node/http_test.ts +++ b/cli/tests/unit_node/http_test.ts @@ -195,14 +195,11 @@ Deno.test("[node/http] request default protocol", async () => { // @ts-ignore IncomingMessageForClient // deno-lint-ignore no-explicit-any let clientRes: any; - // deno-lint-ignore no-explicit-any - let clientReq: any; server.listen(() => { - clientReq = http.request( + const req = http.request( // deno-lint-ignore no-explicit-any { host: "localhost", port: (server.address() as any).port }, (res) => { - assert(res.socket instanceof EventEmitter); assertEquals(res.complete, false); res.on("data", () => {}); res.on("end", () => { @@ -213,14 +210,13 @@ Deno.test("[node/http] request default protocol", async () => { promise2.resolve(); }, ); - clientReq.end(); + req.end(); }); server.on("close", () => { promise.resolve(); }); await promise; await promise2; - assert(clientReq.socket instanceof EventEmitter); assertEquals(clientRes!.complete, true); }); -- cgit v1.2.3