Merge pull request #792 from prymitive/fix-default-timeout

fix(backend): ensure that we always use default timeout for am requests
This commit is contained in:
Łukasz Mierzwa
2019-06-27 22:04:41 +01:00
committed by GitHub

View File

@@ -172,6 +172,11 @@ func (config *configSchema) Read() {
if err != nil {
log.Fatal(err)
}
for i, s := range config.Alertmanager.Servers {
if s.Timeout.Seconds() == 0 {
config.Alertmanager.Servers[i].Timeout = v.GetDuration("alertmanager.timeout")
}
}
err = v.UnmarshalKey("jira", &config.JIRA)
if err != nil {