| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent 50ccda2 commit 623ef49
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -50,5 +50,9 @@ testSingle(port1, port2); | |||
| 50 | 50 | port2.close(common.mustCall(testBothClosed)); | |
| 51 | 51 | testBothClosed(); | |
| 52 | 52 | ||
| 53 | - setTimeout(common.mustNotCall('The communication channel is still open'), | ||
| 54 | - common.platformTimeout(1000)).unref(); | ||
| 53 | + function tickUnref(n, fn) { | ||
| 54 | + if (n === 0) return fn(); | ||
| 55 | + setImmediate(tickUnref, n - 1, fn).unref(); | ||
| 56 | + } | ||
| 57 | + | ||
| 58 | + tickUnref(10, common.mustNotCall('The communication channel is still open')); | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments