fix latency first route of public server (#1129)

This commit is contained in:
Sijie.Sun
2025-07-19 18:16:53 +08:00
committed by GitHub
parent e25cd9be37
commit 85f0091056
9 changed files with 326 additions and 186 deletions
+8 -5
View File
@@ -201,14 +201,17 @@ impl Peer {
}
pub fn has_directly_connected_conn(&self) -> bool {
self.conns.iter().any(|entry|!(entry.value()).is_hole_punched())
self.conns
.iter()
.any(|entry| !(entry.value()).is_hole_punched())
}
pub fn get_directly_connections(&self) -> DashSet<uuid::Uuid> {
self.conns.iter()
.filter(|entry| !(entry.value()).is_hole_punched())
.map(|entry|(entry.value()).get_conn_id())
.collect()
self.conns
.iter()
.filter(|entry| !(entry.value()).is_hole_punched())
.map(|entry| (entry.value()).get_conn_id())
.collect()
}
pub fn get_default_conn_id(&self) -> PeerConnId {