Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
net: inline maybeDestroy()
`maybeDestroy()` is only called from the listener of the `'end'` event. That event is only emitted after the socket is connected (after `UV_EOF` is read) and after `socket.readable` is set to `false`. PR-URL: #27136 Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
- Loading branch information
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| @@ -541,19 +541,9 @@ function onReadableStreamEnd() { | ||
| if (this.writable) | ||
| this.end(); | ||
| } | ||
|
|
||
| if (!this.destroyed && !this.writable && !this.writableLength) | ||
| this.destroy(); | ||
| } | ||
|
|
||
|
|
||