summaryrefslogtreecommitdiff
path: root/lib/cluster.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/cluster.js')
-rw-r--r--lib/cluster.js6
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/cluster.js b/lib/cluster.js
index d60366aaf1..175645f713 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();