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

bug: fix hang when last element in stream takes a long time to process #9

Merged
merged 1 commit into from
Nov 30, 2021

Conversation

kbrownlees
Copy link
Contributor

The stream reader assumed there would be a gap between processing the last element in a list & the stream finishing (end event).

This is not always the case - the last element could have an async component or be a very large object which takes a long time to process.

This PR adds an explicit 'ended' flag to the stream node so the parser knows if the stream has actually ended.

Fixes #8

The stream reader assumed there would be a gap between processing the last element in a list & the stream finishing (end event).
This is not always the case - the last element could have an async component or be a very large object which takes a long time
to process.

This PR adds an explicit 'ended' flag to the stream node so the parser knows if the stream has actually ended.

Fixes discoveryjs#8
@lahmatiy
Copy link
Member

Looks good. Thank you!

@lahmatiy lahmatiy merged commit 758291a into discoveryjs:master Nov 30, 2021
@lahmatiy
Copy link
Member

Fix published in v0.5.6

@kbrownlees kbrownlees deleted the kb/8/fix-timing-issue branch November 30, 2021 22:24
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.

Timing can cause stream to never finish
2 participants