diff options
author | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-06-14 09:04:46 +0900 |
---|---|---|
committer | FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> | 2016-06-14 10:40:17 +0900 |
commit | 69b416145ec63d0c96ebc8e41edef007c1552cbc (patch) | |
tree | cf4a08158f9229e79f8c1df82e650b2e462cb0c3 /server | |
parent | 6f55b713bb51164fdb4c156285bf2e8101103fa6 (diff) |
server: fix aca6fd6ad4409b4cb63682bff3c79fca8ca2800d regression
Fix the bug introduced by the following commit:
commit aca6fd6ad4409b4cb63682bff3c79fca8ca2800d
Author: ISHIDA Wataru <ishida.wataru@lab.ntt.co.jp>
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 <fujita.tomonori@lab.ntt.co.jp>
Diffstat (limited to 'server')
-rw-r--r-- | server/monitor.go | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/server/monitor.go b/server/monitor.go index a265629d..1f445c35 100644 --- a/server/monitor.go +++ b/server/monitor.go @@ -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 { |