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: #24288
Refs: #24075

PR-URL: #24290
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Daniel Bevenius <[email protected]>
Reviewed-By: Ouyang Yadong <[email protected]>
  • Loading branch information
addaleax committed Nov 16, 2018
1 parent b92d55f commit 8cdb92f
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 @@ -350,12 +350,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 8cdb92f

Please sign in to comment.