Skip to content

Commit

Permalink
Merge pull request #2040 from k8s-infra-cherrypick-robot/cherry-pick-…
Browse files Browse the repository at this point in the history
…2033-to-release-1.7

[release-1.7] 🐛 pkg/session fix used RoundTripper inside anonymous func for KeepAliveHandler
  • Loading branch information
k8s-ci-robot authored Jul 19, 2023
2 parents 3b148f3 + 41bbb5b commit e722df7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/session/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ func newClient(ctx context.Context, logger logr.Logger, sessionKey string, url *

if feature.EnableKeepAlive {
vimClient.RoundTripper = session.KeepAliveHandler(vimClient.RoundTripper, feature.KeepAliveDuration, func(tripper soap.RoundTripper) error {
_, err := methods.GetCurrentTime(ctx, vimClient)
_, err := methods.GetCurrentTime(ctx, tripper)
if err != nil {
logger.Error(err, "failed to keep alive govmomi client")
logger.Info("clearing the session", "key", sessionKey)
Expand Down

0 comments on commit e722df7

Please sign in to comment.