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 authored and codebytere committed Jan 12, 2019
1 parent 8b4502b commit 64fd3e2
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
@@ -349,12 +349,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();

0 comments on commit 64fd3e2

Please sign in to comment.