Clean reported remote endpoints in service method.

This commit is contained in:
Adam Ierymenko 2022-06-29 15:33:03 -04:00
parent 409a897c22
commit 624f2e2946
No known key found for this signature in database
GPG key ID: C8877CF2D7A5D7F3

View file

@ -305,6 +305,7 @@ impl<SI: SystemInterface> Peer<SI> {
paths.retain(|p| ((time_ticks - p.last_receive_time_ticks) < PEER_EXPIRATION_TIME) && (p.path.strong_count() > 0));
prioritize_paths(&mut paths);
}
self.reported_local_endpoints.lock().retain(|_, ts| (time_ticks - *ts) < PEER_EXPIRATION_TIME);
(time_ticks - self.last_receive_time_ticks.load(Ordering::Relaxed).max(self.create_time_ticks)) < PEER_EXPIRATION_TIME
}