diff --git a/lib/cluster.js b/lib/cluster.js index d60366aaf179c8..175645f713f701 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -719,7 +719,11 @@ function workerInit() { const handle = handles[key]; delete handles[key]; waitingCount++; - handle.owner.close(checkWaitingCount); + + if (handle.owner) + handle.owner.close(checkWaitingCount); + else + handle.close(checkWaitingCount); } checkWaitingCount();