Skip to content
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

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

Closed
wants to merge 1 commit into from
Closed

Conversation

Kosta-Github
Copy link

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

…tors"

The sample code for ["Piping to writable streams from async iterators"](https://nodejs.org/docs/latest-v14.x/api/stream.html#stream_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.
@nodejs-github-bot nodejs-github-bot added doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem. labels Jun 22, 2020
@lpinca
Copy link
Member

lpinca commented Jun 22, 2020

Thank you but the example is being removed in #33992 .

@Trott
Copy link
Member

Trott commented Jun 24, 2020

Welcome, @Kosta-Github, and thanks for the pull request. Because the example has been removed in another pull request, I'm going to close this. If I'm mistaken about the state of things, please leave a comment or re-open. Thanks again!

@Trott Trott closed this Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
doc Issues and PRs related to the documentations. stream Issues and PRs related to the stream subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants