From a48abf027b5134b6eca7b5bcc21c07ff4f2d3626 Mon Sep 17 00:00:00 2001 From: kanade Date: Thu, 20 Apr 2023 09:29:47 +0800 Subject: [PATCH] =?UTF-8?q?rpc=E5=AE=A2=E6=88=B7=E7=AB=AF=E4=BF=AE?= =?UTF-8?q?=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/consul/consul_discovery.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/consul/consul_discovery.go b/lib/consul/consul_discovery.go index ce71204..7df5efa 100644 --- a/lib/consul/consul_discovery.go +++ b/lib/consul/consul_discovery.go @@ -203,7 +203,7 @@ func (d *ConsulDiscovery) watch() { continue } for _, p := range ps { - if !strings.HasPrefix(p.Key, prefix) { // avoid prefix issue of consul List + if path.Dir(p.Key) != d.basePath { continue } k := strings.TrimPrefix(p.Key, prefix)