Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit 72d5162

Browse files
committed
test: make test-quic-process-cleanup work with --worker
PR-URL: #159 Reviewed-By: James M Snell <[email protected]>
1 parent 081e1a4 commit 72d5162

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/parallel/test-quic-process-cleanup.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ if (!common.hasQuic)
88
// sequence and we can stop execution at any point.
99

1010
const quic = require('quic');
11-
const { isMainThread, Worker, workerData } = require('worker_threads');
11+
const { Worker, workerData } = require('worker_threads');
1212

13-
if (isMainThread) {
13+
if (workerData === null) {
1414
new Worker(__filename, { workerData: { removeFromSocket: true } });
1515
new Worker(__filename, { workerData: { removeFromSocket: false } });
1616
return;

0 commit comments

Comments
 (0)