Skip to content

Commit bd622f7

Browse files
Update lib/internal/timers.js
Co-authored-by: Mert Can Altin <mertgold60@gmail.com>
1 parent 9151208 commit bd622f7

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

lib/internal/timers.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -429,8 +429,10 @@ function reuseOrCreateUnrefTimeout(timer, callback, after, arg) {
429429
timer._idleTimeout = after;
430430
timer._onTimeout = callback;
431431
const args = timer._timerArgs;
432-
if (args === undefined || args[0] !== arg) {
432+
if (args === undefined) {
433433
timer._timerArgs = [arg];
434+
} else {
435+
args[0] = arg;
434436
}
435437
// Re-inserts the timer and re-initializes its async resource, so
436438
// async_hooks observes the same init/destroy sequence as if a new

0 commit comments

Comments
 (0)