Use else if

This commit is contained in:
Viktor Liu
2024-06-22 00:32:28 +09:00
parent c309917077
commit f2bcccd64f

View File

@@ -180,11 +180,9 @@ func (r *Route) startResolver(ctx context.Context) {
if interval > failureInterval { if interval > failureInterval {
ticker.Reset(failureInterval) ticker.Reset(failureInterval)
} }
} else { } else if interval > failureInterval {
// Reset to the original interval if the update succeeds // Reset to the original interval if the update succeeds
if interval > failureInterval { ticker.Reset(interval)
ticker.Reset(interval)
}
} }
} }
} }