diff options
Diffstat (limited to 'server')
-rw-r--r-- | server/server.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/server.go b/server/server.go index ba30f578..c665e627 100644 --- a/server/server.go +++ b/server/server.go @@ -2323,7 +2323,7 @@ func (s *BgpServer) Watch(opts ...WatchOption) (w *Watcher) { w.notify(createWatchEventPeerState(peer)) } } - if w.opts.initBest { + if w.opts.initBest && s.active() == nil { w.notify(&WatchEventBestPath{ PathList: s.globalRib.GetBestPathList(table.GLOBAL_RIB_NAME, nil), MultiPathList: s.globalRib.GetBestMultiPathList(table.GLOBAL_RIB_NAME, nil), @@ -2370,7 +2370,7 @@ func (s *BgpServer) Watch(opts ...WatchOption) (w *Watcher) { } } } - if w.opts.initPostUpdate { + if w.opts.initPostUpdate && s.active() == nil { for _, rf := range s.globalRib.GetRFlist() { if len(s.globalRib.Tables[rf].GetDestinations()) == 0 { continue |