fix(acp): detect transport close in incoming_protocol_actor#222
Draft
nikomatsakis wants to merge 1 commit into
Draft
fix(acp): detect transport close in incoming_protocol_actor#222nikomatsakis wants to merge 1 commit into
nikomatsakis wants to merge 1 commit into
Conversation
The incoming actor's merged stream never ended when the transport closed because the merge kept waiting on internal channels. Chain a sentinel item after the transport stream so EOF is detected explicitly, then return an error to abort the try_join! and let run_until cancel the foreground task.
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.
Problem: there is no "event" to indicate that the input event stream has closed. So a naive "proxy' pattern like:
will hang forever. This PR contains one possible fix but, to be honest, I am not sure it's the right one. It causes an "Error" on incoming transport close which will therefore bring down the
connect_with.I'm going to open a stream on Zulip to discuss.
Fixes #223