diff --git a/lib/_stream_duplex.js b/lib/_stream_duplex.js index 1ccb931260ddbd..b123cdcb4d776f 100644 --- a/lib/_stream_duplex.js +++ b/lib/_stream_duplex.js @@ -35,7 +35,7 @@ const Writable = require('_stream_writable'); util.inherits(Duplex, Readable); { - // avoid scope creep, the keys array can then be collected + // Allow the keys array to be GC'ed. const keys = Object.keys(Writable.prototype); for (var v = 0; v < keys.length; v++) { const method = keys[v]; diff --git a/lib/net.js b/lib/net.js index 9313a6dbc0c45c..68dde9cac3615e 100644 --- a/lib/net.js +++ b/lib/net.js @@ -244,7 +244,7 @@ function Socket(options) { else options = util._extend({}, options); - const aho = options.allowHalfOpen; + const allowHalfOpen = options.allowHalfOpen; // Prevent the "no-half-open enforcer" from being inherited from `Duplex`. options.allowHalfOpen = true; @@ -253,7 +253,7 @@ function Socket(options) { stream.Duplex.call(this, options); // Default to *not* allowing half open sockets. - this.allowHalfOpen = Boolean(aho); + this.allowHalfOpen = Boolean(allowHalfOpen); if (options.handle) { this._handle = options.handle; // private