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 #2601 #2603

Merged
merged 1 commit into from
Jun 16, 2020
Merged

Fix #2601 #2603

merged 1 commit into from
Jun 16, 2020

Conversation

dead-claudia
Copy link
Member

@dead-claudia dead-claudia commented Jun 16, 2020

Description

Fix issue where ending a stream in the middle of a stream callback would result in erroneous parent stream state for the rest of that emit.

Motivation and Context

Fixes #2601

How Has This Been Tested?

Added a new test to verify the fix.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation change

Checklist:

  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.
  • I have updated docs/change-log.md

@dead-claudia dead-claudia marked this pull request as ready for review June 16, 2020 15:30
@dead-claudia dead-claudia merged commit 31d1df5 into MithrilJS:next Jun 16, 2020
@dead-claudia dead-claudia deleted the fix-stream branch June 16, 2020 15:36
@jaydh
Copy link

jaydh commented Jun 16, 2020

Thanks for writing the test cases :)

One concern, if you clone the list but have one stream end a subsequent stream then I think you'll enter a similar situation.
If o1 ends o2, the cloned list will still execute o2

@dead-claudia
Copy link
Member Author

@jaydh Not after this patch. I forgot to add tests for it, but that should account for that particular case.

@JAForbes JAForbes mentioned this pull request Apr 28, 2022
@orbitbot orbitbot added the patch label May 1, 2022
StephanHoyer pushed a commit that referenced this pull request May 16, 2022
Fix issue where ending a stream in the middle of a stream callback would result in erroneous parent stream state for the rest of that emit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: Closed
Development

Successfully merging this pull request may close these issues.

Mithril stream.end(true) ends other dependent streams as well
3 participants