mirror of
https://github.com/osrg/gobgp.git
synced 2024-05-11 05:55:10 +00:00
server: fix aca6fd6ad4 regression
Fix the bug introduced by the following commit:
commit aca6fd6ad4
Author: ISHIDA Wataru <[email protected]>
Date: Tue May 24 05:47:52 2016 +0000
server: refactoring for monitorbestchanged api. use watcher infra
The fix is a workaround. We need to rewrite monitor.go shortly to
remove the dependency of grpc from server package. So we fix this in a
cleaner way soon.
Signed-off-by: FUJITA Tomonori <[email protected]>
This commit is contained in:
+1
-7
@@ -41,13 +41,7 @@ func (w *grpcWatcher) stop() {
|
||||
}
|
||||
|
||||
func (w *grpcWatcher) watchingEventTypes() []watcherEventType {
|
||||
types := make([]watcherEventType, 0, 4)
|
||||
for _, t := range []watcherEventType{WATCHER_EVENT_UPDATE_MSG, WATCHER_EVENT_POST_POLICY_UPDATE_MSG, WATCHER_EVENT_BESTPATH_CHANGE, WATCHER_EVENT_STATE_CHANGE} {
|
||||
if len(w.reqs[t]) > 0 {
|
||||
types = append(types, t)
|
||||
}
|
||||
}
|
||||
return types
|
||||
return []watcherEventType{WATCHER_EVENT_UPDATE_MSG, WATCHER_EVENT_POST_POLICY_UPDATE_MSG, WATCHER_EVENT_BESTPATH_CHANGE, WATCHER_EVENT_STATE_CHANGE}
|
||||
}
|
||||
|
||||
func (w *grpcWatcher) loop() error {
|
||||
|
||||
Reference in New Issue
Block a user