We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0e06197 commit cca5efbCopy full SHA for cca5efb
lib/timers.js
@@ -304,7 +304,7 @@ const Timeout = function(after) {
304
305
function unrefdHandle() {
306
this.owner._onTimeout();
307
- if (!this.owner.repeat)
+ if (!this.owner._repeat)
308
this.owner.close();
309
}
310
test/parallel/test-timers-unrefd-interval-still-fires.js
@@ -0,0 +1,18 @@
1
+/*
2
+ * This test is a regression test for joyent/node#8900.
3
+ */
4
+var assert = require('assert');
5
+
6
+var N = 5;
7
+var nbIntervalFired = 0;
8
+var timer = setInterval(function() {
9
+ ++nbIntervalFired;
10
+ if (nbIntervalFired === N)
11
+ clearInterval(timer);
12
+}, 1);
13
14
+timer.unref();
15
16
+setTimeout(function onTimeout() {
17
+ assert.strictEqual(nbIntervalFired, N);
18
+}, 100);
0 commit comments