From e7c5e465d1ed373fd216d3c66954b50ac9721f0c Mon Sep 17 00:00:00 2001 From: wenxu12345 <44203734@qq.com> Date: Fri, 29 Apr 2022 17:02:03 +0800 Subject: [PATCH] config --- pkg/grpc-etcdv3/getcdv3/resolver.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/grpc-etcdv3/getcdv3/resolver.go b/pkg/grpc-etcdv3/getcdv3/resolver.go index 4a8c5d644..76e5643c9 100644 --- a/pkg/grpc-etcdv3/getcdv3/resolver.go +++ b/pkg/grpc-etcdv3/getcdv3/resolver.go @@ -45,7 +45,7 @@ func NewResolver(schema, etcdAddr, serviceName string) (*Resolver, error) { r.etcdAddr = etcdAddr resolver.Register(&r) - ctx, _ := context.WithTimeout(context.TODO(), time.Second*5) + ctx, _ := context.WithTimeout(context.Background(), time.Second*5) conn, err := grpc.DialContext(ctx, GetPrefix(schema, serviceName), grpc.WithDefaultServiceConfig(fmt.Sprintf(`{"LoadBalancingPolicy": "%s"}`, roundrobin.Name)), grpc.WithInsecure())