Skip to content

Commit c84b420

Browse files
addaleaxcodebytere
authored andcommitted
Revert "net: partially revert "simplify Socket.prototype._final""
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]>
1 parent 0f6a952 commit c84b420

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/net.js

-6
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,6 @@ Socket.prototype._final = function(cb) {
349349
return this.once('connect', () => this._final(cb));
350350
}
351351

352-
// TODO(addaleax): This should not be necessary.
353-
if (!this.readable || this._readableState.ended) {
354-
cb();
355-
return this.destroy();
356-
}
357-
358352
if (!this._handle)
359353
return cb();
360354

0 commit comments

Comments
 (0)