Skip to content

Conversation

@Frando
Copy link
Member

@Frando Frando commented Nov 18, 2025

Description

  • fix idle timeout clear condition (previously it would hot loop)
  • fix hot loop when local_addrs watchable becomes disconnected during shutdown
  • when sending a datagram fails in the transports sender, include the dst address in the error message
  • do not break the RemoteStateActor when sending a datagram fails

Breaking Changes

Notes & open questions

Change checklist

  • Self-review.
  • Documentation updates following the style guide, if relevant.
  • Tests if relevant.
  • All breaking changes documented.
    • List all breaking changes in the above "Breaking Changes" section.
    • Open an issue or PR on any number0 repos that are affected by this breaking change. Give guidance on how the updates should be handled or do the actual updates themselves. The major ones are:

@github-actions
Copy link

github-actions bot commented Nov 18, 2025

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

@n0bot n0bot bot added this to iroh Nov 18, 2025
@github-project-automation github-project-automation bot moved this to 🏗 In progress in iroh Nov 18, 2025
@github-actions
Copy link

github-actions bot commented Nov 18, 2025

Netsim report & logs for this PR have been generated and is available at: LOGS
This report will remain available for 3 days.

Last updated for commit: ecfc806

@Frando Frando force-pushed the Frando/mp-fix-remote-state-actor-loop branch from 6ffcbb0 to 7c11665 Compare November 18, 2025 13:51
@matheus23
Copy link
Member

@Frando here's another version of fixing the idle timeout: #3678

I think I'd prefer that version ✌️

let task = task::spawn(
async move {
if let Err(err) = self.run(rx).await {
error!("actor failed: {err:#}");
Copy link
Contributor

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.

if any_match {
Err(io::Error::other("all available transports failed"))
Err(io::Error::other(format!(
"all available transports failed for destination {dst:?}"
Copy link
Contributor

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?

Copy link
Member Author

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.

matheus23 and others added 6 commits November 20, 2025 09:47
…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.
@Frando Frando requested a review from flub November 20, 2025 10:06
@Frando Frando merged commit d328bf2 into feat-multipath Nov 20, 2025
27 of 28 checks passed
@github-project-automation github-project-automation bot moved this from 🏗 In progress to ✅ Done in iroh Nov 20, 2025
@matheus23 matheus23 deleted the Frando/mp-fix-remote-state-actor-loop branch November 20, 2025 14:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

4 participants