-
Notifications
You must be signed in to change notification settings - Fork 29.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc: update write callback documentation #38959
Conversation
- replace _*may or may not* be called_ with _will be called_ because the callback is always called - remove _To reliably detect write errors, add a listener for the `'error'` event_ because the `error` event will NOT be emitted if a write occurs after the stream has been closed
If I understand the linked issue correctly, this is true only for Node.js v15+. Adding the labels so it doesn't get backported, feel free to remove them if I misunderstood the situation. |
@nodejs/streams |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
Commit Queue failed- Loading data for nodejs/node/pull/38959 ✔ Done loading data for nodejs/node/pull/38959 ----------------------------------- PR info ------------------------------------ Title doc: update write callback documentation (#38959) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch simoneb:patch-1 -> nodejs:master Labels author ready, doc, dont-land-on-v12.x, dont-land-on-v14.x, stream Commits 1 - doc: update write callback documentation Committers 1 - GitHub PR-URL: https://github.com/nodejs/node/pull/38959 Fixes: https://github.com/nodejs/node/issues/38704 Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel Reviewed-By: Benjamin Gruenbaum Reviewed-By: Robert Nagy Reviewed-By: Matteo Collina ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/38959 Fixes: https://github.com/nodejs/node/issues/38704 Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel Reviewed-By: Benjamin Gruenbaum Reviewed-By: Robert Nagy Reviewed-By: Matteo Collina -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 07 Jun 2021 14:02:22 GMT ✔ Approvals: 5 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-677503321 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-677663819 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/38959#pullrequestreview-677841411 ✔ - Robert Nagy (@ronag) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-677850823 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-678297907 ✖ Last GitHub CI failed ℹ Green GitHub Actions CI is sufficient -------------------------------------------------------------------------------- ✔ Aborted `git node land` session in /home/runner/work/node/node/.ncuhttps://github.com/nodejs/node/actions/runs/926267471 |
Commit Queue failed- Loading data for nodejs/node/pull/38959 ✔ Done loading data for nodejs/node/pull/38959 ----------------------------------- PR info ------------------------------------ Title doc: update write callback documentation (#38959) ⚠ Could not retrieve the email or name of the PR author's from user's GitHub profile! Branch simoneb:patch-1 -> nodejs:master Labels author ready, doc, dont-land-on-v12.x, dont-land-on-v14.x, stream Commits 1 - doc: update write callback documentation Committers 1 - GitHub PR-URL: https://github.com/nodejs/node/pull/38959 Fixes: https://github.com/nodejs/node/issues/38704 Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel Reviewed-By: Benjamin Gruenbaum Reviewed-By: Robert Nagy Reviewed-By: Matteo Collina ------------------------------ Generated metadata ------------------------------ PR-URL: https://github.com/nodejs/node/pull/38959 Fixes: https://github.com/nodejs/node/issues/38704 Reviewed-By: James M Snell Reviewed-By: Antoine du Hamel Reviewed-By: Benjamin Gruenbaum Reviewed-By: Robert Nagy Reviewed-By: Matteo Collina -------------------------------------------------------------------------------- ℹ This PR was created on Mon, 07 Jun 2021 14:02:22 GMT ✔ Approvals: 5 ✔ - James M Snell (@jasnell) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-677503321 ✔ - Antoine du Hamel (@aduh95) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-677663819 ✔ - Benjamin Gruenbaum (@benjamingr): https://github.com/nodejs/node/pull/38959#pullrequestreview-677841411 ✔ - Robert Nagy (@ronag) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-677850823 ✔ - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/38959#pullrequestreview-678297907 ✔ Last GitHub Actions successful ℹ Green GitHub Actions CI is sufficient -------------------------------------------------------------------------------- ✔ No git cherry-pick in progress ✔ No git am in progress ✔ No git rebase in progress -------------------------------------------------------------------------------- - Bringing origin/master up to date... From https://github.com/nodejs/node * branch master -> FETCH_HEAD ✔ origin/master is now up-to-date - Downloading patch for 38959 From https://github.com/nodejs/node * branch refs/pull/38959/merge -> FETCH_HEAD ✔ Fetched commits as 52f8471b5281..453d7dbcbd99 -------------------------------------------------------------------------------- [master d77e235f62] doc: update write callback documentation Author: Simone Busoli Date: Mon Jun 7 16:01:49 2021 +0200 1 file changed, 2 insertions(+), 3 deletions(-) ✔ Patches applied -------------------------------------------------------------------------------- --------------------------------- New Message ---------------------------------- doc: update write callback documentation
PR-URL: #38959
|
- replace _*may or may not* be called_ with _will be called_ because the callback is always called - remove _To reliably detect write errors, add a listener for the `'error'` event_ because the `error` event will NOT be emitted if a write occurs after the stream has been closed PR-URL: #38959 Fixes: #38704 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
Landed in cf609cc |
- replace _*may or may not* be called_ with _will be called_ because the callback is always called - remove _To reliably detect write errors, add a listener for the `'error'` event_ because the `error` event will NOT be emitted if a write occurs after the stream has been closed PR-URL: #38959 Fixes: #38704 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
- replace _*may or may not* be called_ with _will be called_ because the callback is always called - remove _To reliably detect write errors, add a listener for the `'error'` event_ because the `error` event will NOT be emitted if a write occurs after the stream has been closed PR-URL: #38959 Fixes: #38704 Reviewed-By: James M Snell <[email protected]> Reviewed-By: Antoine du Hamel <[email protected]> Reviewed-By: Benjamin Gruenbaum <[email protected]> Reviewed-By: Robert Nagy <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
'error'
event because theerror
event will NOT be emitted if a write occurs after the stream has been closedFixes: #38704