config: fix ReadConfigfileServe() not to loop endlessly

Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
ISHIDA Wataru
2016-05-09 05:20:57 +00:00
parent 95e5dee506
commit db59fed44d
+6 -7
View File
@@ -44,19 +44,18 @@ func ReadConfigfileServe(path, format string, configCh chan *BgpConfigSet) {
}
cnt++
configCh <- c
select {
case <-sigCh:
log.Info("reload the config file")
}
continue
goto NEXT
ERROR:
if cnt == 0 {
log.Fatal("can't read config file ", path, ", ", err)
} else {
log.Warning("can't read config file ", path, ", ", err)
continue
}
NEXT:
select {
case <-sigCh:
log.Info("reload the config file")
}
}
}