summaryrefslogtreecommitdiffhomepage
path: root/config
diff options
context:
space:
mode:
authorISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-04-28 12:47:57 +0000
committerISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>2016-05-09 05:20:57 +0000
commitdb59fed44d8a1df5b5feffbfb1fc7f3c9b61a8c1 (patch)
treec78ff1430bb34da41c36c769303fdb724808e5fa /config
parent95e5dee5065939db0b6612e482bc1c7339e5bbca (diff)
config: fix ReadConfigfileServe() not to loop endlessly
Signed-off-by: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
Diffstat (limited to 'config')
-rw-r--r--config/serve.go13
1 files changed, 6 insertions, 7 deletions
diff --git a/config/serve.go b/config/serve.go
index 6f49d0da..70a4e896 100644
--- a/config/serve.go
+++ b/config/serve.go
@@ -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")
+ }
}
}