mirror of
https://github.com/telemt/telemt.git
synced 2026-04-15 09:34:10 +03:00
fix(pool): improve endpoint handling during single endpoint outages
This commit is contained in:
@@ -77,6 +77,12 @@ impl MePool {
|
|||||||
return Vec::new();
|
return Vec::new();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if endpoints.len() == 1 && self.single_endpoint_outage_disable_quarantine() {
|
||||||
|
let mut guard = self.endpoint_quarantine.lock().await;
|
||||||
|
guard.retain(|_, expiry| *expiry > Instant::now());
|
||||||
|
return endpoints.to_vec();
|
||||||
|
}
|
||||||
|
|
||||||
let mut guard = self.endpoint_quarantine.lock().await;
|
let mut guard = self.endpoint_quarantine.lock().await;
|
||||||
let now = Instant::now();
|
let now = Instant::now();
|
||||||
guard.retain(|_, expiry| *expiry > now);
|
guard.retain(|_, expiry| *expiry > now);
|
||||||
|
|||||||
Reference in New Issue
Block a user