diff --git a/lib/cluster.js b/lib/cluster.js index e4bbd5f3ff7838..62eb78eeba113e 100644 --- a/lib/cluster.js +++ b/lib/cluster.js @@ -703,7 +703,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();