add version to rip route, reduce bandwidth (#23)

reduce bandwidth usage on route propagation
This commit is contained in:
Sijie.Sun
2024-03-02 18:54:45 +08:00
committed by GitHub
parent c6c505f9d7
commit 7918031d8b
4 changed files with 271 additions and 15 deletions
+5 -1
View File
@@ -413,7 +413,7 @@ impl PeerManager {
peer_map.close_peer(&peer_id).await.unwrap();
}
tokio::time::sleep(std::time::Duration::from_secs(10)).await;
tokio::time::sleep(std::time::Duration::from_secs(3)).await;
}
});
}
@@ -447,4 +447,8 @@ impl PeerManager {
pub fn get_nic_channel(&self) -> mpsc::Sender<SinkItem> {
self.nic_channel.clone()
}
pub fn get_basic_route(&self) -> Arc<BasicRoute> {
self.basic_route.clone()
}
}