mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Auth: declare auth variable inside the loop (#11476)
Co-authored-by: yutedz <54038175+yutedz@users.noreply.github.com>
This commit is contained in:
parent
0c787e26bc
commit
b95a465235
@ -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)
|
||||
|
Loading…
x
Reference in New Issue
Block a user