mirror of
https://github.com/fluxerapp/fluxer
synced 2026-10-07 19:22:14 +09:00
fix(app-proxy): collapse the discovery cold-start retry condition (#1716)
This commit is contained in:
@@ -44,10 +44,10 @@ impl DiscoveryCache {
|
||||
}
|
||||
{
|
||||
let mut last_attempt = self.cold_start_attempt.lock().await;
|
||||
if let Some(at) = *last_attempt {
|
||||
if at.elapsed() < COLD_START_RETRY_COOLDOWN {
|
||||
return None;
|
||||
}
|
||||
if let Some(at) = *last_attempt
|
||||
&& at.elapsed() < COLD_START_RETRY_COOLDOWN
|
||||
{
|
||||
return None;
|
||||
}
|
||||
*last_attempt = Some(Instant::now());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user