1
0
mirror of https://github.com/netbirdio/netbird.git synced 2025-06-24 11:41:35 +02:00

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

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

@ -59,13 +59,6 @@ func Login(ctx context.Context, config *Config, setupKey string, jwtToken string
return err return err
} }
log.Infof("peer has successfully logged-in to the Management service %s", config.ManagementURL.String()) 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 return nil
} }