Skip to content

Commit 4cae5b8

Browse files
committed
Revert "net: partially revert "simplify Socket.prototype._final""
This reverts commit ac1f56c. Refs: nodejs#24288 Refs: nodejs#24075
1 parent c58bced commit 4cae5b8

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

lib/net.js

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -345,12 +345,6 @@ Socket.prototype._final = function(cb) {
345345
return this.once('connect', () => this._final(cb));
346346
}
347347

348-
// TODO(addaleax): This should not be necessary.
349-
if (!this.readable || this._readableState.ended) {
350-
cb();
351-
return this.destroy();
352-
}
353-
354348
if (!this._handle)
355349
return cb();
356350

0 commit comments

Comments
 (0)