Skip to content

Commit

Permalink
Merge pull request #574 from openziti/fix-refresh-tight-loop
Browse files Browse the repository at this point in the history
fix refresh tight loop
  • Loading branch information
plorenz authored May 31, 2024
2 parents 871efb6 + 109282b commit a0ebf80
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 2 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
# Release notes 0.23.38

## Issues Fixed and Dependency Updates

* github.com/openziti/sdk-golang: [v0.23.37 -> v0.23.38](https://github.com/openziti/sdk-golang/compare/v0.23.37...v0.23.38)
* [Issue #573](https://github.com/openziti/sdk-golang/issues/573) - api session refresh spins in a tight loop if there is no current api session

# Release notes 0.23.37

## Issues Fixed and Dependency Updates
Expand Down
2 changes: 1 addition & 1 deletion ziti/sdkinfo/build_info.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 5 additions & 1 deletion ziti/ziti.go
Original file line number Diff line number Diff line change
Expand Up @@ -796,7 +796,11 @@ func (context *ContextImpl) runRefreshes() {
apiSession := context.CtrlClt.GetCurrentApiSession()

if apiSession == nil {
pfxlog.Logger().Warn("could not refresh api session, current api session is nil")
pfxlog.Logger().Warn("could not refresh api session, current api session is nil, authenticating")
if err := context.Authenticate(); err != nil {
pfxlog.Logger().WithError(err).Error("failed to authenticate")
}
refreshAt = time.Now().Add(5 * time.Second)
continue
}

Expand Down

0 comments on commit a0ebf80

Please sign in to comment.