diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-22 17:29:28 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-07-22 17:29:28 +0900 |
commit | eed17cda973baeb06ccaba85bb31580c6ab3ded9 (patch) | |
tree | 983dce7d2e175300430d8e1bd9f24b2aa2182dcb /gobgpd/main.go | |
parent | f097981a33d107a6d31c4da0f25b90957f3d25fe (diff) |
collector uses the new Watch API
Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'gobgpd/main.go')
-rw-r--r-- | gobgpd/main.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/gobgpd/main.go b/gobgpd/main.go index b5d9ecfb..ca90ece7 100644 --- a/gobgpd/main.go +++ b/gobgpd/main.go @@ -214,8 +214,10 @@ func main() { log.Fatalf("failed to set zebra config: %s", err) } } - if err := bgpServer.SetCollector(newConfig.Collector); err != nil { - log.Fatalf("failed to set collector config: %s", err) + if len(newConfig.Collector.Config.Url) > 0 { + if err := bgpServer.StartCollector(&newConfig.Collector.Config); err != nil { + log.Fatalf("failed to set collector config: %s", err) + } } if err := bgpServer.SetRpkiConfig(newConfig.RpkiServers); err != nil { log.Fatalf("failed to set rpki config: %s", err) |