diff --git a/pkg/config/api_config.go b/pkg/config/api_config.go index 4e62f60a8..b2b3c7935 100644 --- a/pkg/config/api_config.go +++ b/pkg/config/api_config.go @@ -340,9 +340,8 @@ func listenResourceAndMethodEvent(key string) bool { case mvccpb.DELETE: logger.Infof("get event (key{%s}) = event{EventNodeDeleted}", event.Kv.Key) handleDeleteEvent(event.Kv.Key, event.Kv.Value) - return true default: - return false + logger.Infof("get event (key{%s}) = event{%d}", event.Kv.Key, event.Type) } } } diff --git a/pkg/router/route.go b/pkg/router/route.go index 94688336b..dcc3cd031 100644 --- a/pkg/router/route.go +++ b/pkg/router/route.go @@ -123,13 +123,10 @@ func (rt *Route) FindAPI(fullPath string, httpverb config.HTTPVerb) (*router.API // DeleteNode delete node by fullPath func (rt *Route) DeleteNode(fullPath string) bool { lowerPath := strings.ToLower(fullPath) - if _, found := rt.searchWildcard(lowerPath); found { - rt.lock.RLock() - defer rt.lock.RUnlock() - rt.tree.Remove(lowerPath) - return true - } - return false + rt.lock.RLock() + defer rt.lock.RUnlock() + rt.tree.Remove(lowerPath) + return true } // DeleteAPI delete api by fullPath and http verb