From fb6d817ceb28935edb33541d6909ffd8811b7713 Mon Sep 17 00:00:00 2001 From: Kirill Zhdanov Date: Tue, 25 Jan 2022 16:13:44 +0100 Subject: [PATCH] Negative maxTimeoutSeconds Fixes #868 Signed-off-by: Kirill Zhdanov --- main.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.go b/main.go index 0c5a14f..1c2e77b 100644 --- a/main.go +++ b/main.go @@ -442,7 +442,7 @@ func getTimeout(r *http.Request, module config.Module, offset float64) (timeoutS } var maxTimeoutSeconds = timeoutSeconds - offset - if module.Timeout.Seconds() < maxTimeoutSeconds && module.Timeout.Seconds() > 0 { + if module.Timeout.Seconds() < maxTimeoutSeconds && module.Timeout.Seconds() > 0 || maxTimeoutSeconds < 0 { timeoutSeconds = module.Timeout.Seconds() } else { timeoutSeconds = maxTimeoutSeconds -- 2.25.1