Fix failcount logic
This commit is contained in:
parent
b45a061184
commit
a23d979b86
|
@ -130,11 +130,13 @@ async fn main() -> Result<(), anyhow::Error> {
|
|||
if let Err(_) = timeout(Duration::from_secs(2), ctrl_dns_rx.next()).await {
|
||||
warn!("Failed to get response for test query");
|
||||
fail_count += 1;
|
||||
} else if use_fallback.load(Ordering::Relaxed) {
|
||||
} else {
|
||||
if use_fallback.load(Ordering::Relaxed) {
|
||||
info!("TLS server back online, disabling fallback");
|
||||
fail_count = 0;
|
||||
use_fallback.store(false, Ordering::Relaxed);
|
||||
}
|
||||
fail_count = 0;
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
Loading…
Reference in a new issue