1
0
Fork 0

Allow short healthcheck interval with long timeout

This commit is contained in:
Kevin McConnell 2023-08-08 15:40:05 +01:00 committed by GitHub
parent d6457e6cbb
commit 55e00be36e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 51 additions and 6 deletions

View file

@ -69,11 +69,6 @@ func NewServiceHealthChecker(ctx context.Context, metrics metricsHealthCheck, co
timeout = time.Duration(dynamic.DefaultHealthCheckTimeout)
}
if timeout >= interval {
logger.Warn().Msgf("Health check timeout should be lower than the health check interval. Interval set to timeout + 1 second (%s).", interval)
interval = timeout + time.Second
}
client := &http.Client{
Transport: transport,
}