1
0
Fork 0
mirror of https://github.com/eosswedenorg/antelope-api-healthcheck synced 2026-06-17 04:50:02 +02:00

cmd/antelope-api-healtcheck/main.go: req_timeout.Minutes() returns a float, so must check for greater than 1.0 instead of 0.

This commit is contained in:
Henrik Hautakoski 2023-02-07 12:25:03 +01:00
parent adf9508197
commit 228d7ae731
No known key found for this signature in database
GPG key ID: 217490840C18A5D9

View file

@ -187,7 +187,7 @@ func main() {
// Dont alow anything below 2 seconds. that is abit aggresive.
logger.Warn("Request timeout is less than the minimum. Setting it to 2 seconds", "req_timeout", req_timeout)
req_timeout = time.Second * 2
} else if req_timeout.Minutes() > 0 {
} else if req_timeout.Minutes() > 1.0 {
// Anything more than 1 min is too long :)
logger.Warn("Request timeout is more than the maximum. Setting it to 1 minute", "req_timeout", req_timeout)
req_timeout = time.Minute