problem: switches an upstream with disabled validation to the syncing state though it doesn't check the sync for it

This commit is contained in:
a10zn8
2022-09-19 04:40:52 +04:00
parent 6ddef70d6e
commit 55fa1ea0d9

View File

@@ -98,6 +98,11 @@ abstract class DefaultUpstream(
}
fun statusByLag(lag: Long, proposed: UpstreamAvailability): UpstreamAvailability {
if (options.disableValidation == true) {
// if we specifically told that this upstream should be _always valid_ then skip
// the status calculation and trust the proposed value as is
return proposed
}
return if (proposed == UpstreamAvailability.OK) {
when {
lag > 6 -> UpstreamAvailability.SYNCING