Remove mgm close steps, in defer doing it already (#729)

Simple code cleaning. Remove duplicated steps in login.
In the defer already close the management connection.
This commit is contained in:
Zoltan Papp 2023-03-07 15:01:47 +01:00 committed by GitHub
parent ed4f90b6aa
commit 24310c63e2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,13 +59,6 @@ func Login(ctx context.Context, config *Config, setupKey string, jwtToken string
return err
}
log.Infof("peer has successfully logged-in to the Management service %s", config.ManagementURL.String())
err = mgmClient.Close()
if err != nil {
log.Errorf("failed to close the Management service client: %v", err)
return err
}
return nil
}