1
0
mirror of https://github.com/go-kratos/kratos.git synced 2025-01-10 00:29:01 +02:00

Merge pull request #479 from wuxingzhong/master

modify
This commit is contained in:
Terry.Mao 2020-01-12 19:13:20 +08:00 committed by GitHub
commit 3f88443edf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -610,7 +610,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) {