Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
8f2aba2
Basic using of QUIC NAT Traversal for holepunching
flub Oct 31, 2025
bbf947a
Do not receive DISCO messages, we no longer need them
flub Oct 31, 2025
697583e
remove disco from endpoint_state.rs
flub Oct 31, 2025
343a533
remove disco from endpoint_map.rs
flub Oct 31, 2025
22b80f1
remove disco from magicsock.rs
flub Oct 31, 2025
ff13fa0
delete disco and key modules, all unused now
flub Oct 31, 2025
77f63b9
delete disco metrics
flub Oct 31, 2025
5c4851a
emit a single metric, so metrics are used
flub Oct 31, 2025
a8d9748
Don't store remote NAT candidates
flub Nov 3, 2025
68e673b
Clean up connections at an interval
flub Nov 3, 2025
b8fc574
Merge branch 'feat-multipath' into feat-multipath-quic-nat
flub Nov 17, 2025
ce227f5
compile against protocol-simplification branch
flub Nov 18, 2025
b059bab
updage api
flub Nov 20, 2025
11d9731
Merge branch 'feat-multipath' into feat-multipath-quic-nat
flub Nov 20, 2025
a93db87
some intermediate stuff
flub Nov 20, 2025
1fc0714
hook up adding addresses
flub Nov 21, 2025
e24b41d
properly patch in quinn git dependency and clippy
dignifiedquire Nov 23, 2025
75fe396
Merge remote-tracking branch 'origin/feat-multipath' into feat-qnt-me…
dignifiedquire Nov 23, 2025
e3bb795
Merge pull request #3697 from n0-computer/feat-qnt-merge-main
dignifiedquire Nov 23, 2025
08274f1
Make sure to use canonical addrs when comparing hp rounds
flub Nov 23, 2025
f12341d
bump quinn
flub Nov 23, 2025
f0cdffe
replace trace log with event
flub Nov 23, 2025
9097dc8
improve select path logic
flub Nov 23, 2025
709b80f
bump quinn
flub Nov 23, 2025
fffa4af
deps: cargo update
Frando Nov 23, 2025
7101d19
cleanup unused deps
dignifiedquire Nov 23, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Clean up connections at an interval
  • Loading branch information
flub committed Nov 3, 2025
commit 68e673b6d6939cbb3979b3bd690e0d4c64b09878
8 changes: 7 additions & 1 deletion iroh/src/magicsock/endpoint_map/endpoint_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,9 @@ use crate::{
/// attempted more frequently than at this interval.
const HOLEPUNCH_ATTEMPTS_INTERVAL: Duration = Duration::from_secs(5);

/// Interval at which [`ConnectionState`]s for closed connections are cleaned up.
const CONN_CLEANUP_INTERVAL: Duration = Duration::from_secs(5);

// TODO: use this
// /// Number of addresses that are not active that we keep around per endpoint.
// ///
Expand Down Expand Up @@ -216,6 +219,7 @@ impl EndpointStateActor {
mut inbox: mpsc::Receiver<EndpointStateMessage>,
) -> Result<(), Whatever> {
trace!("actor started");
let mut conn_cleanup = std::pin::pin!(time::interval(CONN_CLEANUP_INTERVAL));
loop {
let scheduled_path_open = match self.scheduled_open_path {
Some(when) => MaybeFuture::Some(time::sleep_until(when)),
Expand Down Expand Up @@ -259,6 +263,9 @@ impl EndpointStateActor {
self.scheduled_holepunch = None;
self.trigger_holepunching().await;
}
_ = conn_cleanup.tick() => {
self.cleanup_connections();
}
}
}
trace!("actor terminating");
Expand Down Expand Up @@ -699,7 +706,6 @@ impl EndpointStateActor {
}

/// Clean up connections which no longer exist.
// TODO: Call this on a schedule.
fn cleanup_connections(&mut self) {
self.connections.retain(|_, c| c.handle.upgrade().is_some());
}
Expand Down
Loading