mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
Backport #13577
Disable auth gracefully without impacting existing watchers. Signed-off-by: Lan Liang <gcslyp@gmail.com>
This commit is contained in:
@@ -264,6 +264,7 @@ func (c *Client) getToken(ctx context.Context) error {
|
||||
resp, err := c.Auth.Authenticate(ctx, c.Username, c.Password)
|
||||
if err != nil {
|
||||
if err == rpctypes.ErrAuthNotEnabled {
|
||||
c.authTokenBundle.UpdateAuthToken("")
|
||||
return nil
|
||||
}
|
||||
return err
|
||||
|
||||
Reference in New Issue
Block a user