cluster: fix permanent deoptimizations

PR-URL: https://github.com/nodejs/node/pull/12456
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
pull/12456/head
Brian White 2017-04-24 02:20:55 -04:00
parent e8a429075f
commit 033ea9974f
No known key found for this signature in database
GPG Key ID: 606D7358F94DA209
1 changed files with 2 additions and 2 deletions

View File

@ -99,7 +99,7 @@ function shared(message, handle, indexesKey, cb) {
delete handles[key];
delete indexes[indexesKey];
return close.apply(this, arguments);
};
}.bind(handle);
assert(handles[key] === undefined);
handles[key] = handle;
cb(message.errno, handle);
@ -192,7 +192,7 @@ function _disconnect(masterInitiated) {
}
}
for (const key in handles) {
for (var key in handles) {
const handle = handles[key];
delete handles[key];
waitingCount++;