fix: stream protocols not completing#21733
Merged
Conversation
3 tasks
zcbenz
approved these changes
Jan 13, 2020
MarshallOfSound
approved these changes
Jan 13, 2020
|
Release Notes Persisted
|
This was referenced Jan 13, 2020
Contributor
|
I have automatically backported this PR to "7-1-x", please check out #21758 |
Contributor
|
I have automatically backported this PR to "8-x-y", please check out #21759 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of Change
It's possible for NodeStreamLoader to receive the "end" event from the source stream while it's still writing to the network service. When that happens, it doesn't immediately clean itself up; instead it notes that the source stream is finished and waits for the write operation to complete. However, it wasn't correctly calling
NotifyCompletewhen finishing the final write operation. This adds that call when appropriate.Fixes #21018. h/t to @pfrazee for the minimal repro which allowed me to track this down.
Checklist
npm testpassesRelease Notes
Notes: Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended.