From 821da8a54f490a91ae7202074d569da86aeb50f1 Mon Sep 17 00:00:00 2001 From: wuxingzhong <330332812@qq.com> Date: Tue, 7 Jan 2020 16:38:25 +0800 Subject: [PATCH] modify discovery --- pkg/naming/discovery/discovery.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkg/naming/discovery/discovery.go b/pkg/naming/discovery/discovery.go index 088304d25..5b8c8c241 100644 --- a/pkg/naming/discovery/discovery.go +++ b/pkg/naming/discovery/discovery.go @@ -601,7 +601,9 @@ func (d *Discovery) polls(ctx context.Context) (apps map[string]*naming.Instance } if err = d.httpClient.Get(ctx, uri, "", params, res); err != nil { d.switchNode() - log.Error("discovery: client.Get(%s) error(%+v)", uri+"?"+params.Encode(), err) + if ctx.Err() != context.Canceled { + log.Error("discovery: client.Get(%s) error(%+v)", uri+"?"+params.Encode(), err) + } return } if ec := ecode.Int(res.Code); !ecode.Equal(ecode.OK, ec) {