-
Notifications
You must be signed in to change notification settings - Fork 317
fix(multipath): fix remote state actor termination #3676
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix(multipath): fix remote state actor termination #3676
Conversation
|
Documentation for this PR has been generated and is available at: https://n0-computer.github.io/iroh/pr/3676/docs/iroh/ Last updated: 2025-11-20T09:37:05Z |
6ffcbb0 to
7c11665
Compare
| let task = task::spawn( | ||
| async move { | ||
| if let Err(err) = self.run(rx).await { | ||
| error!("actor failed: {err:#}"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So this was a poor-man's attempt at being able to have "fatal" errors. The right thing of course is to panic and spawn the tasks in a JoinSet and making sure the panic bubbles up to the endpoint. But that's for another day I guess. For now making this infallible is the safer approach I think. While if forces you to handle the fatal error everywhere it will probably result in better code.
iroh/src/magicsock/transports.rs
Outdated
| if any_match { | ||
| Err(io::Error::other("all available transports failed")) | ||
| Err(io::Error::other(format!( | ||
| "all available transports failed for destination {dst:?}" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hum, convention in the stdlib is that the caller should provide the context. Don't we have somewhere else to add context?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sgtm. pushed a commit that does this.
…send_datagram` (#3678) Intended for merging into #3676 - Makes `idle_timeout` always be a `time::Sleep` that is `.reset` once there is any activity. I find this much easier to reason about. - Fixes a bug where `handle_msg_send_datagram` short-circuits when sending on one path fails. Instead, it should *try* all paths, even if some of them fail.
…ix-remote-state-actor-loop
Description
Breaking Changes
Notes & open questions
Change checklist
quic-rpciroh-gossipiroh-blobsdumbpipesendme