From bbbc200387920d1200c7af5ac871f68f9c3c1dfa Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Thu, 30 May 2024 17:16:12 -0400 Subject: [PATCH 1/2] Don't spin in tight loop if api session isn't set. Fixes #573 --- ziti/sdkinfo/build_info.go | 2 +- ziti/ziti.go | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/ziti/sdkinfo/build_info.go b/ziti/sdkinfo/build_info.go index 0ad541c4..a46d702a 100644 --- a/ziti/sdkinfo/build_info.go +++ b/ziti/sdkinfo/build_info.go @@ -20,5 +20,5 @@ package sdkinfo const ( - Version = "v0.23.37" + Version = "v0.23.38" ) diff --git a/ziti/ziti.go b/ziti/ziti.go index c7ddfca6..16bca4c2 100644 --- a/ziti/ziti.go +++ b/ziti/ziti.go @@ -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 } From 109282b4cd5fdf0535f43bbd1cfa8ca2f73d21ce Mon Sep 17 00:00:00 2001 From: Paul Lorenz Date: Thu, 30 May 2024 17:17:30 -0400 Subject: [PATCH 2/2] Update changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e7e9583..c78a6caf 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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