From e3b386c2aa9970f2f999f07ac43b7eb8fe319d8d Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 30 Oct 2026 18:28:14 +0100 Subject: track connection type per path --- src/transport/paths.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/transport/paths.rs') diff --git a/src/transport/paths.rs b/src/transport/paths.rs index a8c7c49..76d22b6 100644 --- a/src/transport/paths.rs +++ b/src/transport/paths.rs @@ -361,6 +361,7 @@ impl Table { .and_then(|path| path.rtt) .map(|rtt| rtt.as_secs_f64() * 1000.0), down: path.is_some_and(|path| path.is_down(now)), + connection: None, } } } @@ -472,9 +473,11 @@ impl Paths { self.located(infos) } - /// `infos` with where each path goes (`located`); asked outside the table's lock. + /// `infos` with where each path goes (`located`) and the transport's connection + /// there; asked outside the table's lock. fn located(&self, mut infos: Vec) -> Vec { for info in &mut infos { + info.connection = self.connection(&info.address); info.address = self.location(&info.address); } infos -- cgit v1.3.1