Skip to content

Commit 7a4b800

Browse files
Revert "fix: unref timers implicitly scheduled for MAX_TIMEOUT"
This reverts commit d4a65aa.
1 parent d4a65aa commit 7a4b800

File tree

1 file changed

+2
-6
lines changed

1 file changed

+2
-6
lines changed

lib/runnable.js

+2-6
Original file line numberDiff line numberDiff line change
@@ -234,7 +234,7 @@ Runnable.prototype.clearTimeout = function () {
234234
*/
235235
Runnable.prototype.resetTimeout = function () {
236236
var self = this;
237-
var ms = this.timeout();
237+
var ms = this.timeout() || MAX_TIMEOUT;
238238

239239
this.clearTimeout();
240240
this.timer = setTimeout(function () {
@@ -243,11 +243,7 @@ Runnable.prototype.resetTimeout = function () {
243243
}
244244
self.callback(self._timeoutError(ms));
245245
self.timedOut = true;
246-
}, ms || MAX_TIMEOUT);
247-
248-
if (!ms) {
249-
this.timer.unref();
250-
}
246+
}, ms);
251247
};
252248

253249
/**

0 commit comments

Comments
 (0)