doc: update write callback documentation#38959
doc: update write callback documentation#38959simoneb wants to merge 1 commit intonodejs:masterfrom simoneb:patch-1
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 |
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 <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
|
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 <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
- 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 <jasnell@gmail.com> Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com> Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com> Reviewed-By: Robert Nagy <ronagy@icloud.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
'error'event because theerrorevent will NOT be emitted if a write occurs after the stream has been closedFixes: #38704