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:
@@ -98,6 +98,11 @@ abstract class DefaultUpstream(
|
|||||||
}
|
}
|
||||||
|
|
||||||
fun statusByLag(lag: Long, proposed: UpstreamAvailability): UpstreamAvailability {
|
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) {
|
return if (proposed == UpstreamAvailability.OK) {
|
||||||
when {
|
when {
|
||||||
lag > 6 -> UpstreamAvailability.SYNCING
|
lag > 6 -> UpstreamAvailability.SYNCING
|
||||||
|
|||||||
Reference in New Issue
Block a user