Commit 1b8eb227 authored by Robert Nagy's avatar Robert Nagy Committed by Rich Trott
Browse files

doc: fix stream async iterator sample

The for await loop into writable loop could cause an unhandled exception
in the case where we are waiting for data from the async iterable and
this no `'error'` handler is registered on the writable.

Fixes: https://github.com/nodejs/node/issues/31222

PR-URL: https://github.com/nodejs/node/pull/31252


Reviewed-By: default avatarMatteo Collina <matteo.collina@gmail.com>
Reviewed-By: default avatarRich Trott <rtrott@gmail.com>
Reviewed-By: default avatarJames M Snell <jasnell@gmail.com>
parent e468759c
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment