summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/internal/stream_base_commons.ts
diff options
context:
space:
mode:
authorawait-ovo <13152410380@163.com>2023-07-03 03:11:34 +0800
committerGitHub <noreply@github.com>2023-07-02 19:11:34 +0000
commit0f4051a37ad23377091043206e64126003caa480 (patch)
tree3fbe98a9c78ee716665dcadaa962ea132eb9bfea /ext/node/polyfills/internal/stream_base_commons.ts
parent01f0d03ae82c422c1f9551f3bfbb57daac769ddc (diff)
fix(ext/node): ignore cancelled timer when node timer refresh (#19637)
For timers that have already executed clearTimeout, there is no need to recreate a new timer when refresh is executed again.
Diffstat (limited to 'ext/node/polyfills/internal/stream_base_commons.ts')
-rw-r--r--ext/node/polyfills/internal/stream_base_commons.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/node/polyfills/internal/stream_base_commons.ts b/ext/node/polyfills/internal/stream_base_commons.ts
index 250f54c7d..d7acf729d 100644
--- a/ext/node/polyfills/internal/stream_base_commons.ts
+++ b/ext/node/polyfills/internal/stream_base_commons.ts
@@ -35,7 +35,7 @@ import {
import { isUint8Array } from "ext:deno_node/internal/util/types.ts";
import { errnoException } from "ext:deno_node/internal/errors.ts";
import { getTimerDuration, kTimeout } from "ext:deno_node/internal/timers.mjs";
-import { setUnrefTimeout } from "node:timers";
+import { clearTimeout, setUnrefTimeout } from "node:timers";
import { validateFunction } from "ext:deno_node/internal/validators.mjs";
import { codeMap } from "ext:deno_node/internal_binding/uv.ts";
import { Buffer } from "node:buffer";