Skip to content

Commit

Permalink
Negative maxTimeoutSeconds
Browse files Browse the repository at this point in the history
Fixes #868
  • Loading branch information
zhdkirill committed Jan 25, 2022
1 parent f4a5173 commit 00c6314
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion main.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 00c6314

Please sign in to comment.