summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--lib/net.js11
1 files changed, 5 insertions, 6 deletions
diff --git a/lib/net.js b/lib/net.js
index fb9c72cb95..7690254042 100644
--- a/lib/net.js
+++ b/lib/net.js
@@ -1524,9 +1524,9 @@ Server.prototype.getConnections = function(cb) {
if (--left === 0) return end(null, total);
}
- this._slaves.forEach(function(slave) {
- slave.getConnections(oncount);
- });
+ for (var n = 0; n < this._slaves.length; n++) {
+ this._slaves[n].getConnections(oncount);
+ }
};
@@ -1562,9 +1562,8 @@ Server.prototype.close = function(cb) {
this._connections++;
// Poll slaves
- this._slaves.forEach(function(slave) {
- slave.close(onSlaveClose);
- });
+ for (var n = 0; n < this._slaves.length; n++)
+ this._slaves[n].close(onSlaveClose);
} else {
this._emitCloseIfDrained();
}