| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed.
Sorry, something went wrong.
There was a problem hiding this comment.
This requires a full CITGM run.
I would flag it as "backing for LTS", as I would not backport there anytime soon out of caution.
Sorry, something went wrong.
| @@ -524,16 +524,8 @@ Socket.prototype._read = function(n) { | |||
|
|
|||
| Socket.prototype.end = function(data, encoding) { | |||
| stream.Duplex.prototype.end.call(this, data, encoding); | |||
There was a problem hiding this comment.
While we are at it, can you add a callback to end()? that's the full signature for streams (https://nodejs.org/api/stream.html#stream_writable_end_chunk_encoding_callback).
Sorry, something went wrong.
There was a problem hiding this comment.
yup, done!
Sorry, something went wrong.
| stream.Duplex.prototype.end.call(this, data, encoding); | ||
| this.writable = false; | ||
| DTRACE_NET_STREAM_END(this); | ||
| LTTNG_NET_STREAM_END(this); |
There was a problem hiding this comment.
Can we move these to _destroy instead and use a stock end implementation?
Sorry, something went wrong.
There was a problem hiding this comment.
I think would be a breaking change in light of your comment about not returning this below :/ I’d agree that that would be ideal, definitely.
Sorry, something went wrong.
| else | ||
| maybeDestroy(this); | ||
|
|
||
| return this; |
There was a problem hiding this comment.
wow, this differs from node streams, as end does not return this. We might want to add it to streams too.
Sorry, something went wrong.
There was a problem hiding this comment.
I'll send a follow up PR to this one, which will be a semver-major.
Sorry, something went wrong.
There was a problem hiding this comment.
LGTM
Sorry, something went wrong.
Sorry, something went wrong.
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: nodejs#18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: #18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: #18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: #18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: nodejs#18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: #18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: #18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: #18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
`writable` is already set by the streams side, and there is a handler waiting for the writable side to finish which already takes care of the other cleanup code that was previously there; both of these things can therefore be removed. PR-URL: #18708 Reviewed-By: Luigi Pinca <luigipinca@gmail.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
| Back | FazBrowse Home | New Git URL |
writable is already set by the streams side, and
there is a handler waiting for the writable side to finish
which already takes care of the other cleanup code that
was previously there; both of these things can therefore be removed.
Checklist
Affected core subsystem(s)
net