8000
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 935eac1 commit 146e8acCopy full SHA for 146e8ac
lib/timers.js
@@ -603,7 +603,6 @@ Timeout.prototype.unref = function() {
603
this._handle.owner = this;
604
this._handle[kOnTimeout] = unrefdHandle;
605
this._handle.start(delay);
606
- this._handle.domain = this.domain;
607
this._handle.unref();
608
}
609
return this;
test/parallel/test-domain-timers.js
@@ -30,13 +30,19 @@ timeoutd.on('error', common.mustCall(function(e) {
30
assert.strictEqual(e.message, 'Timeout UNREFd',
31
'Domain should catch timer error');
32
clearTimeout(timeout);
33
-}));
+}, 2));
34
35
+let t;
36
timeoutd.run(function() {
37
setTimeout(function() {
38
throw new Error('Timeout UNREFd');
39
}, 0).unref();
40
+
41
+ t = setTimeout(function() {
42
+ throw new Error('Timeout UNREFd');
43
+ }, 0);
44
});
45
+t.unref();
46
47
const immediated = domain.create();
48