Skip to content

Commit

Permalink
Add code to populate the newly added fields.
Browse files Browse the repository at this point in the history
  • Loading branch information
easwars committed Oct 15, 2019
1 parent 5ae6ccd commit abfa6a9
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion resolver_conn_wrapper.go
Expand Up @@ -26,6 +26,7 @@ import (

"google.golang.org/grpc/backoff"
"google.golang.org/grpc/balancer"
"google.golang.org/grpc/credentials"
"google.golang.org/grpc/grpclog"
"google.golang.org/grpc/internal/channelz"
"google.golang.org/grpc/internal/grpcsync"
Expand Down Expand Up @@ -92,8 +93,19 @@ func newCCResolverWrapper(cc *ClientConn) (*ccResolverWrapper, error) {
done: grpcsync.NewEvent(),
}

var credsClone credentials.TransportCredentials
if creds := cc.dopts.copts.TransportCredentials; creds != nil {
credsClone = creds.Clone()
}
rbo := resolver.BuildOption{
DisableServiceConfig: cc.dopts.disableServiceConfig,
DialCreds: credsClone,
CredsBundle: cc.dopts.copts.CredsBundle,
Dialer: cc.dopts.copts.Dialer,
}

var err error
ccr.resolver, err = rb.Build(cc.parsedTarget, ccr, resolver.BuildOption{DisableServiceConfig: cc.dopts.disableServiceConfig})
ccr.resolver, err = rb.Build(cc.parsedTarget, ccr, rbo)
if err != nil {
return nil, err
}
Expand Down

0 comments on commit abfa6a9

Please sign in to comment.