From 69b416145ec63d0c96ebc8e41edef007c1552cbc Mon Sep 17 00:00:00 2001 From: FUJITA Tomonori Date: Tue, 14 Jun 2016 09:04:46 +0900 Subject: [PATCH] server: fix aca6fd6ad4409b4cb63682bff3c79fca8ca2800d regression Fix the bug introduced by the following commit: commit aca6fd6ad4409b4cb63682bff3c79fca8ca2800d Author: ISHIDA Wataru 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 --- server/monitor.go | 8 +------- 1 file changed, 1 insertion(+), 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 {