Skip to content

fix: guard async generator callbacks against repeated calls - #2093

Open
Shubham-Padkonde wants to merge 1 commit into
caolan:masterfrom
Shubham-Padkonde:fix/async-generator-callback-once
Open

Shubham-Padkonde wants to merge 1 commit into
caolan:masterfrom
Shubham-Padkonde:fix/async-generator-callback-once

Conversation

@Shubham-Padkonde

Copy link
Copy Markdown

Async-generator inputs currently pass the iteratee callback through without the onlyOnce guard used for ordinary collections. Calling it twice can corrupt the running count and complete successfully instead of reporting the repeated callback.

Apply the same guard to the async-generator path and add a regression test. The new test fails before the fix; npm test passes afterward (704 tests, including lint).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant