diff options
author | Gasman <90539473+MarybethGasman@users.noreply.github.com> | 2023-11-07 07:51:14 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-11-07 00:51:14 +0100 |
commit | 837c870ff4eef49a6d03071d0a3547ab67bc91f7 (patch) | |
tree | 60e756a604fb3d9a0cf4109bef60fbb18189c084 /ext/node/polyfills/http.ts | |
parent | 90189dd9974be01596ec776e63a4eceef1a036e0 (diff) |
fix(node/http): socket.setTimeout (#20930)
Fixes #20923
Diffstat (limited to 'ext/node/polyfills/http.ts')
-rw-r--r-- | ext/node/polyfills/http.ts | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/ext/node/polyfills/http.ts b/ext/node/polyfills/http.ts index ae670d5f0..78bd7cb07 100644 --- a/ext/node/polyfills/http.ts +++ b/ext/node/polyfills/http.ts @@ -8,6 +8,7 @@ const core = globalThis.__bootstrap.core; import { TextEncoder } from "ext:deno_web/08_text_encoding.js"; import { type Deferred, deferred } from "ext:deno_node/_util/async.ts"; +import { setTimeout } from "ext:deno_web/02_timers.js"; import { _normalizeArgs, // createConnection, @@ -289,6 +290,10 @@ class FakeSocket extends EventEmitter { end() {} destroy() {} + + setTimeout(callback, timeout = 0, ...args) { + setTimeout(callback, timeout, args); + } } /** ClientRequest represents the http(s) request from the client */ |