From 228d7ae731058505bbba2bf6000d2236e106a465 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Tue, 7 Feb 2023 12:25:03 +0100 Subject: [PATCH] cmd/antelope-api-healtcheck/main.go: req_timeout.Minutes() returns a float, so must check for greater than 1.0 instead of 0. --- cmd/antelope-api-healtcheck/main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmd/antelope-api-healtcheck/main.go b/cmd/antelope-api-healtcheck/main.go index db31efe..5f20e54 100644 --- a/cmd/antelope-api-healtcheck/main.go +++ b/cmd/antelope-api-healtcheck/main.go @@ -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