diff options
-rw-r--r-- | cli/tests/unit_node/http_test.ts | 1 | ||||
-rw-r--r-- | ext/node/polyfills/http.ts | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/cli/tests/unit_node/http_test.ts b/cli/tests/unit_node/http_test.ts index a84136052..c8c2a52a2 100644 --- a/cli/tests/unit_node/http_test.ts +++ b/cli/tests/unit_node/http_test.ts @@ -353,6 +353,7 @@ Deno.test("[node/http] send request with non-chunked body", async () => { }); req.on("socket", (socket) => { socket.setKeepAlive(); + socket.destroy(); }); req.write("hello "); req.write("world"); diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index 6a1ea7105..391906c40 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -283,6 +283,8 @@ class FakeSocket extends EventEmitter { setKeepAlive() {} end() {} + + destroy() {} } /** ClientRequest represents the http(s) request from the client */ |