cluster: remove obsolete array allocation
The array was only used to create a key. Instead of allocating that first, just directly create the necessary string. PR-URL: https://github.com/nodejs/node/pull/20567 Reviewed-By: Gus Caplan <me@gus.host> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
This commit is contained in:
parent
6550013b73
commit
b4be89ffc1
@ -275,12 +275,8 @@ function queryServer(worker, message) {
|
||||
if (worker.exitedAfterDisconnect)
|
||||
return;
|
||||
|
||||
const args = [message.address,
|
||||
message.port,
|
||||
message.addressType,
|
||||
message.fd,
|
||||
message.index];
|
||||
const key = args.join(':');
|
||||
const key = `${message.address}:${message.port}:${message.addressType}:` +
|
||||
`${message.fd}:${message.index}`;
|
||||
var handle = handles[key];
|
||||
|
||||
if (handle === undefined) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user