mirror of
https://github.com/yusing/godoxy.git
synced 2026-04-10 18:56:55 +02:00
fix(config): fix default values not applied
This commit is contained in:
@@ -36,6 +36,9 @@ func (hc *HealthCheckConfig) ApplyDefaults(defaults HealthCheckConfig) {
|
||||
}
|
||||
}
|
||||
if hc.Retries == 0 {
|
||||
hc.Retries = int64(HealthCheckDownNotifyDelayDefault / hc.Interval)
|
||||
hc.Retries = defaults.Retries
|
||||
if hc.Retries == 0 {
|
||||
hc.Retries = max(1, int64(HealthCheckDownNotifyDelayDefault/hc.Interval))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user