From 60da9d493c97fdfa026d163f80ddc25ee01a6e57 Mon Sep 17 00:00:00 2001 From: Divy Srivastava Date: Mon, 25 Dec 2023 08:58:51 +0530 Subject: fix(ext/node): add ClientRequest#setNoDelay (#21694) Fixes https://github.com/denoland/deno/issues/18316 --- ext/node/polyfills/http.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'ext/node') diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index d45854162..e49f71702 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -892,6 +892,11 @@ class ClientRequest extends OutgoingMessage { } headers.push([key, value]); } + + // Once a socket is assigned to this request and is connected socket.setNoDelay() will be called. + setNoDelay() { + this.socket?.setNoDelay?.(); + } } // isCookieField performs a case-insensitive comparison of a provided string -- cgit v1.2.3