Auth: declare auth variable inside the loop (#11476)
Co-authored-by: yutedz <54038175+yutedz@users.noreply.github.com>
This commit is contained in:
@ -272,10 +272,10 @@ func (c *Client) Dial(ep string) (*grpc.ClientConn, error) {
|
||||
|
||||
func (c *Client) getToken(ctx context.Context) error {
|
||||
var err error // return last error in a case of fail
|
||||
var auth *authenticator
|
||||
|
||||
eps := c.Endpoints()
|
||||
for _, ep := range eps {
|
||||
var auth *authenticator
|
||||
// use dial options without dopts to avoid reusing the client balancer
|
||||
var dOpts []grpc.DialOption
|
||||
_, host, _ := endpoint.ParseEndpoint(ep)
|
||||
|
Reference in New Issue
Block a user