Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions test/parallel/test-tls-ticket-cluster.js
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,10 @@ const workerCount = 4;
const expectedReqCount = 16;

if (cluster.isPrimary) {
let listeningCount = 0;
let reusedCount = 0;
let reqCount = 0;
let lastSession = null;
let shootOnce = false;
let workerPort = null;

function shoot() {
Expand Down Expand Up @@ -73,9 +73,8 @@ if (cluster.isPrimary) {
console.error('[primary] got %j', msg);
if (msg === 'reused') {
++reusedCount;
} else if (msg === 'listening' && !shootOnce) {
workerPort = port || workerPort;
shootOnce = true;
} else if (msg === 'listening' && ++listeningCount === workerCount) {
workerPort = port;
shoot();
}
});
Expand Down