Skip to content

fix: stream protocols not completing#21733

Merged
nornagon merged 1 commit intomasterfrom
fix-stream-protocol
Jan 13, 2020
Merged

fix: stream protocols not completing#21733
nornagon merged 1 commit intomasterfrom
fix-stream-protocol

Conversation

@nornagon
Copy link
Contributor

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 NotifyComplete when 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

Release Notes

Notes: Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended.

@nornagon nornagon merged commit d68f17b into master Jan 13, 2020
@release-clerk
Copy link

release-clerk bot commented Jan 13, 2020

Release Notes Persisted

Fixed an issue where custom stream protocols would sometimes not complete responses when the data stream ended.

@nornagon nornagon deleted the fix-stream-protocol branch January 13, 2020 18:28
@trop
Copy link
Contributor

trop bot commented Jan 13, 2020

I have automatically backported this PR to "7-1-x", please check out #21758

@trop trop bot removed the target/7-1-x label Jan 13, 2020
@trop
Copy link
Contributor

trop bot commented Jan 13, 2020

I have automatically backported this PR to "8-x-y", please check out #21759

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.

Stream protocols and fs.createReadStream sometimes never complete in Electron 7

3 participants