fix(receive): await Endpoint::close for iroh 0.97#124
Open
cbenhagen wants to merge 1 commit inton0-computer:mainfrom
Open
fix(receive): await Endpoint::close for iroh 0.97#124cbenhagen wants to merge 1 commit inton0-computer:mainfrom
cbenhagen wants to merge 1 commit inton0-computer:mainfrom
Conversation
iroh 0.97 no longer closes the endpoint on drop; always await close() after receive work (success or error) and on Ctrl+C. Add CLI regression test with RUST_LOG=iroh::socket=error to ensure the ungraceful-drop error is not logged.
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.
iroh 0.97 no longer closes connections gracefully when an
Endpointis dropped; you’re expected toawait endpoint.close()before the last handle goes away (or you get theiroh::socket“dropped without close” error).receivenow clones the endpoint, runs the existing fetch/export logic in an innerasyncblock, thenclose()s so that path runs on success and on?/bail!errors. Ctrl+C closes the outer clone before exit.sendis unchanged (Router::shutdown()already shuts the stack down).Diff size: most of it is one extra indent level from wrapping the worker body; the behavioral change is small.
Test: CLI regression with
RUST_LOG=iroh::socket=errorand stderr checks, plus the usual byte equality check.