Fix crash when no mesh router is configured (#919)
* Fix crash when no mesh router is configured This adds a check for `meshListen != ""` around the waitFunc code as we have around the other mesh-related code parts above. Fixes https://github.com/prometheus/alertmanager/issues/914 * Update bindata
This commit is contained in:
parent
74e7e48d24
commit
b78869e749
|
@ -221,7 +221,10 @@ func main() {
|
|||
log.Fatal(err)
|
||||
}
|
||||
|
||||
waitFunc := meshWait(mrouter, 5*time.Second)
|
||||
waitFunc := func() time.Duration { return 0 }
|
||||
if *meshListen != "" {
|
||||
waitFunc = meshWait(mrouter, 5*time.Second)
|
||||
}
|
||||
timeoutFunc := func(d time.Duration) time.Duration {
|
||||
if d < notify.MinTimeout {
|
||||
d = notify.MinTimeout
|
||||
|
|
Loading…
Reference in New Issue