Skip to content

Commit

Permalink
Merge pull request kubernetes#39750 from vmware/automated-cherry-pick…
Browse files Browse the repository at this point in the history
…-of-#36169-kubernetes-release-1.5

Automatic merge from submit-queue

Automated cherry pick of kubernetes#36169

Cherry pick of kubernetes#36169 on release-1.5.

kubernetes#36169: Bad conditional in vSphereLogin function
  • Loading branch information
Kubernetes Submit Queue authored Jan 12, 2017
2 parents b36d678 + fc1d0bb commit 6ea0204
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pkg/cloudprovider/providers/vsphere/vsphere.go
Original file line number Diff line number Diff line change
Expand Up @@ -360,8 +360,11 @@ func vSphereLogin(vs *VSphere, ctx context.Context) error {
m := session.NewManager(vs.client.Client)
// retrieve client's current session
u, err := m.UserSession(ctx)
if err == nil && u == nil {
// current session is valid
if err != nil {
glog.Errorf("Error while obtaining user session. err: %q", err)
return err
}
if u != nil {
return nil
}

Expand Down

0 comments on commit 6ea0204

Please sign in to comment.