projects
/
blackbox_exporter.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
f4a5173
)
Negative maxTimeoutSeconds
author
Kirill Zhdanov
<kzhdanov@mirantis.com>
Tue, 25 Jan 2022 15:13:44 +0000
(16:13 +0100)
committer
Kirill Zhdanov
<kzhdanov@mirantis.com>
Tue, 25 Jan 2022 15:18:55 +0000
(16:18 +0100)
Fixes #868
Signed-off-by: Kirill Zhdanov <kzhdanov@mirantis.com>
main.go
patch
|
blob
|
blame
|
history
diff --git
a/main.go
b/main.go
index 0c5a14f428479ad65e1478b3e98d9b46c6410658..1c2e77bd2c35482741ad2612c954c155b9b3e5c8 100644
(file)
--- 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