Skip to content

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

Merged
lahmatiy merged 1 commit intodiscoveryjs:masterfrom
cloudscapelabs:kb/8/fix-timing-issue
Nov 30, 2021
Merged

bug: fix hang when last element in stream takes a long time to process#9
lahmatiy merged 1 commit intodiscoveryjs:masterfrom
cloudscapelabs:kb/8/fix-timing-issue

Conversation

@kbrownlees
Copy link
Copy Markdown
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
Copy Markdown
Member

Looks good. Thank you!

@lahmatiy lahmatiy merged commit 758291a into discoveryjs:master Nov 30, 2021
@lahmatiy
Copy link
Copy Markdown
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

3 participants