mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
config: fix ReadConfigfileServe() not to loop endlessly
Signed-off-by: ISHIDA Wataru <[email protected]>
This commit is contained in:
+6
-7
@@ -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")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user