hue-node-dtls 0.6.4-alpha.4 → 0.6.4-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -68,7 +68,12 @@ class Timer extends Emitter {
|
|
|
68
68
|
restart(ms) {
|
|
69
69
|
this.stop();
|
|
70
70
|
|
|
71
|
-
|
|
71
|
+
const timeout = setTimeout(ontimeout, ms, this);
|
|
72
|
+
// unref() is only available in Node.js, not in browser environments
|
|
73
|
+
if (timeout.unref && typeof timeout.unref === 'function') {
|
|
74
|
+
timeout.unref();
|
|
75
|
+
}
|
|
76
|
+
this[_onTimeout] = timeout;
|
|
72
77
|
}
|
|
73
78
|
}
|
|
74
79
|
|