cluster: removed unused addressType argument from constructor

When intializing the constructor for cluster master we are heavily using
a generic structure, but the effect of passing arguments that are
related to shared_handle is that there is a stale argument passed.

We can avoid such scenarios as all the remaining entities are being
destructured from the message object.

PR-URL: https://github.com/nodejs/node/pull/32963
Reviewed-By: David Carlier <devnexen@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Andrey Pechkurov <apechkurov@gmail.com>
This commit is contained in:
Yash Ladha authored and Beth Griggs committed 2020-04-28 23:00:40 +01:00
1 parent 23eda417b6
commit 4035cbe631
3 files changed
+3 -8

No files matched your search

+1 -6
View File
@@ -297,12 +297,7 @@ function queryServer(worker, message) {
constructor = SharedHandle;
}
handle = new constructor(key,
address,
message.port,
message.addressType,
message.fd,
message.flags);
handle = new constructor(key, address, message);
handles.set(key, handle);
}
+1 -1
View File
@@ -13,7 +13,7 @@ const { constants } = internalBinding('tcp_wrap');
module.exports = RoundRobinHandle;
function RoundRobinHandle(key, address, port, addressType, fd, flags) {
function RoundRobinHandle(key, address, { port, fd, flags }) {
this.key = key;
this.all = new Map();
this.free = new Map();
+1 -1
View File
@@ -6,7 +6,7 @@ const net = require('net');
module.exports = SharedHandle;
function SharedHandle(key, address, port, addressType, fd, flags) {
function SharedHandle(key, address, { port, addressType, fd, flags }) {
this.key = key;
this.workers = new Map();
this.handle = null;