Really start caching by fixing swapped CAS... (#18842) (#18969)

(cherry picked from commit 611af87fdb)

Co-authored-by: Ryo Onodera <ryoqun@gmail.com>
This commit is contained in:
mergify[bot]
2021-07-29 16:52:46 +00:00
committed by GitHub
parent 7fc85b8c9b
commit 40fc14471d

View File

@ -351,7 +351,7 @@ impl StandardBroadcastRun {
if now - last > BROADCAST_PEER_UPDATE_INTERVAL_MS
&& self
.last_peer_update
.compare_and_swap(now, last, Ordering::Relaxed)
.compare_and_swap(last, now, Ordering::Relaxed)
== last
{
let mut w_broadcast_peer_cache = self.broadcast_peer_cache.write().unwrap();