From 6980b31da7fa83fa1e2b17576c4b5b86fe754b17 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BC=A0=E6=96=8C?= <259278618@qq.com> Date: Wed, 29 Apr 2026 10:04:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8Dconsul=E9=99=90=E6=B5=81gatew?= =?UTF-8?q?ay=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- consul/consul.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/consul/consul.go b/consul/consul.go index fb5b69a..a9c508f 100644 --- a/consul/consul.go +++ b/consul/consul.go @@ -251,7 +251,7 @@ func GetInstanceAddr(ctx context.Context, name string) (addr string, err error) err = errors.New("获取服务监听器失败") return } - + defer watch.Close() service, err := watch.Proceed() if err != nil || service == nil { err = errors.New("获取服务实例失败")