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:
Julius Volz 2017-07-22 10:56:55 +02:00 committed by stuart nelson
parent 74e7e48d24
commit b78869e749

View File

@ -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