Skip to content

Commit e82f67d

Browse files
addaleaxrvagg
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 71a9c98 commit e82f67d

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
@@ -350,12 +350,6 @@ Socket.prototype._final = function(cb) {
350350
return this.once('connect', () => this._final(cb));
351351
}
352352

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

0 commit comments

Comments
 (0)