fix resolver (#740)

pull/746/head
邓小川 4 years ago committed by GitHub
parent 330d878aa3
commit 27dc0d45df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      transport/grpc/client.go
  2. 2
      transport/grpc/resolver/discovery/resolver.go

@ -87,7 +87,7 @@ func dial(ctx context.Context, insecure bool, opts ...ClientOption) (*grpc.Clien
grpc.WithUnaryInterceptor(UnaryClientInterceptor(options.middleware)),
}
if options.discoverer != nil {
grpc.WithResolvers(discovery.NewBuilder(options.discoverer))
grpcOpts = append(grpcOpts, grpc.WithResolvers(discovery.NewBuilder(options.discoverer)))
}
if insecure {
grpcOpts = append(grpcOpts, grpc.WithInsecure())

@ -70,5 +70,5 @@ func parseAttributes(md map[string]string) *attributes.Attributes {
for k, v := range md {
pairs = append(pairs, k, v)
}
return attributes.New(pairs)
return attributes.New(pairs...)
}

Loading…
Cancel
Save