fix: use the latest RTT sample, not the oldest, in host info API

This commit is contained in:
2026-08-17 07:28:36 -04:00
parent 5b2fc8fd46
commit 8204737ea6
2 changed files with 14 additions and 4 deletions
+1 -1
View File
@@ -275,7 +275,7 @@ def _build_host_info(host, threshold_checker=None) -> dict:
"family": getattr(conn, "afam", family),
"addr": getattr(conn, "addr", ""),
"state": getattr(conn, "state", ""),
"rtt": (getattr(conn, "rtts", None) or [None])[0],
"rtt": (getattr(conn, "rtts", None) or [None])[-1],
"statetime": getattr(conn, "statetime", None),
"lastbeat": getattr(conn, "lastbeat", None),
}