-
Notifications
You must be signed in to change notification settings - Fork 18
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: empty streams #23
Conversation
Codecov Report
@@ Coverage Diff @@
## master #23 +/- ##
==========================================
- Coverage 94.73% 94.49% -0.25%
==========================================
Files 3 3
Lines 114 109 -5
==========================================
- Hits 108 103 -5
Misses 6 6
Continue to review full report at Codecov.
|
).to.be.eql([ | ||
Buffer.alloc(0), | ||
Buffer.from('more data') | ||
]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This makes sense, we should be able to pull an empty buffer.
@alanshaw i've updated the code and tests to better match expected pull-stream behavior |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
The recent update to better support empty streams was ending streams when an empty value was decoded, it shouldn't, as this prevents other values from being returned. A receiver may respond with an empty message and then continue to write subsequent responses on the same stream.