Skip to content

docs: fix stream async iterator sample

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

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

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Merge request reports

Loading