mirror of
https://github.com/EasyTier/EasyTier.git
synced 2026-05-07 02:09:06 +00:00
some minor fix (#113)
1. fix ospf route panic if no ipv4 assigned. 2. should refetch global peer latency map every 60s 3. remove regex dep because it's too large and unnecessary.
This commit is contained in:
@@ -196,6 +196,17 @@ impl PeerCenterInstance {
|
||||
let mut rpc_ctx = tarpc::context::current();
|
||||
rpc_ctx.deadline = SystemTime::now() + Duration::from_secs(3);
|
||||
|
||||
if ctx
|
||||
.job_ctx
|
||||
.global_peer_map_update_time
|
||||
.load()
|
||||
.elapsed()
|
||||
.as_secs()
|
||||
> 60
|
||||
{
|
||||
ctx.job_ctx.global_peer_map_digest.store(Digest::default());
|
||||
}
|
||||
|
||||
let ret = client
|
||||
.get_global_peer_map(rpc_ctx, ctx.job_ctx.global_peer_map_digest.load())
|
||||
.await?;
|
||||
|
||||
Reference in New Issue
Block a user