feat(iroh): add Endpoint::closed and document watcher behavior#3943
Merged
ramfox merged 2 commits intoFrando/dropped-endpointfrom Feb 13, 2026
Merged
feat(iroh): add Endpoint::closed and document watcher behavior#3943ramfox merged 2 commits intoFrando/dropped-endpointfrom
Endpoint::closed and document watcher behavior#3943ramfox merged 2 commits intoFrando/dropped-endpointfrom
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3943/docs/iroh/ Last updated: 2026-02-13T12:18:34Z |
7405a6e to
cfa01dd
Compare
Endpoint::closed and document watcher behavior
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
Based on #3941 which is based on #3879
Endpoint::closed, which returns aCancellationTokenthat is cancelled once the endpoint is closingBreaking Changes
Notes & open questions
CancellationTokenwe could make this anasync fn, however to me it looks quite useful to get aCancellationTokenand be able to usetokio::spawn(endpoint_closed.run_until_cancelled_owned(async move { .. })))Endpoint::closestarts, not when it ends. I wasn't sure what expected behavior is here. I opted for start because this guarantees that the endpoint is fully usable until then.Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme