Skip to content

Commit

Permalink
fixup! net,stream: remove DuplexBase
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Apr 3, 2018
1 parent 82b72c8 commit 5c397d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion lib/_stream_duplex.js
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
4 changes: 2 additions & 2 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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
Expand Down

0 comments on commit 5c397d9

Please sign in to comment.