Skip to content

Commit

Permalink
Revert "net: partially revert "simplify Socket.prototype._final""
Browse files Browse the repository at this point in the history
This reverts commit ac1f56c.

Refs: nodejs#24288
Refs: nodejs#24075
  • Loading branch information
addaleax committed Nov 10, 2018
1 parent c58bced commit 4cae5b8
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions lib/net.js
Original file line number Diff line number Diff line change
Expand Up @@ -345,12 +345,6 @@ Socket.prototype._final = function(cb) {
return this.once('connect', () => this._final(cb));
}

// TODO(addaleax): This should not be necessary.
if (!this.readable || this._readableState.ended) {
cb();
return this.destroy();
}

if (!this._handle)
return cb();

Expand Down

0 comments on commit 4cae5b8

Please sign in to comment.