summaryrefslogtreecommitdiff
path: root/lib/internal/cluster
diff options
context:
space:
mode:
Diffstat (limited to 'lib/internal/cluster')
-rw-r--r--lib/internal/cluster/child.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/internal/cluster/child.js b/lib/internal/cluster/child.js
index 40c1a12327..39e891214f 100644
--- a/lib/internal/cluster/child.js
+++ b/lib/internal/cluster/child.js
@@ -3,6 +3,7 @@ const assert = require('assert');
const util = require('util');
const path = require('path');
const EventEmitter = require('events');
+const { owner_symbol } = require('internal/async_hooks').symbols;
const Worker = require('internal/cluster/worker');
const { internal, sendHelper } = require('internal/cluster/utils');
const cluster = new EventEmitter();
@@ -207,8 +208,8 @@ function _disconnect(masterInitiated) {
delete handles[key];
waitingCount++;
- if (handle.owner)
- handle.owner.close(checkWaitingCount);
+ if (handle[owner_symbol])
+ handle[owner_symbol].close(checkWaitingCount);
else
handle.close(checkWaitingCount);
}