Skip to content

fix drain() function for "Piping to writable streams from async iterators"

Rodrigo Muino Tomonari requested to merge github/fork/Kosta-Github/patch-1 into master

The sample code for "Piping to writable streams from async iterators" is containing an event listener leak, since it registers 2 event listeners, but don't remove them again.

The drain() function has been changed to remove all the listeners that have been registered within that function in any case again.

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