mirror of
https://github.com/zerotier/ZeroTierOne.git
synced 2025-06-07 13:03:45 +02:00
prevent deadlock
This commit is contained in:
parent
ff2a9c88f0
commit
f548905db4
1 changed files with 51 additions and 49 deletions
|
@ -520,6 +520,7 @@ void Peer::performMultipathStateCheck(void *tPtr, int64_t now)
|
||||||
unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now)
|
unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now)
|
||||||
{
|
{
|
||||||
unsigned int sent = 0;
|
unsigned int sent = 0;
|
||||||
|
{
|
||||||
Mutex::Lock _l(_paths_m);
|
Mutex::Lock _l(_paths_m);
|
||||||
|
|
||||||
performMultipathStateCheck(tPtr, now);
|
performMultipathStateCheck(tPtr, now);
|
||||||
|
@ -581,6 +582,7 @@ unsigned int Peer::doPingAndKeepalive(void *tPtr,int64_t now)
|
||||||
}
|
}
|
||||||
_alive_path_count = alive_path_count_tmp;
|
_alive_path_count = alive_path_count_tmp;
|
||||||
_dead_path_count = dead_path_count_tmp;
|
_dead_path_count = dead_path_count_tmp;
|
||||||
|
}
|
||||||
_peer_latency.Observe(latency(now));
|
_peer_latency.Observe(latency(now));
|
||||||
return sent;
|
return sent;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue