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 <jasnell@gmail.com> Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By: Ouyang Yadong <oyydoibh@gmail.com>
1 parent 0f6a952 commit c84b420

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

‎lib/net.js‎

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -349,12 +349,6 @@ Socket.prototype._final = function(cb) {
349349
returnthis.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-
returnthis.destroy();
356-
}
357-
358352
if(!this._handle)
359353
returncb();
360354

0 commit comments

Comments
 (0)