Fix shutdown crash with nil mesh router

This commit is contained in:
Julius Volz 2017-11-03 23:44:05 +01:00
parent 029c70d6fe
commit f64a419853

View File

@ -238,8 +238,10 @@ func main() {
defer func() {
close(stopc)
// Stop receiving updates from router before shutting down.
mrouter.Stop()
if *meshListen != "" {
// Stop receiving updates from router before shutting down.
mrouter.Stop()
}
wg.Wait()
}()