From 40792f31c564e165b7d661f4b5e09bcd084b152d Mon Sep 17 00:00:00 2001 From: Todd Date: Fri, 31 May 2024 00:22:41 +0000 Subject: [PATCH 1/2] backport of commit c3ee4fa9ff495a5046723744a882ac8db102bc3a --- api/proxy/proxy.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/proxy/proxy.go b/api/proxy/proxy.go index 789dbfccf3..d276585c2b 100644 --- a/api/proxy/proxy.go +++ b/api/proxy/proxy.go @@ -273,14 +273,14 @@ func (p *ClientProxy) Start(opt ...Option) (retErr error) { // might as well leave it open so the next connection can be // tried. sess, err := sessions.NewClient(p.apiClient).Read(p.ctx, p.sessionAuthzData.SessionId) - if err != nil || sess == nil || sess.Item == nil || sess.Item.TerminationReason == "" { + if err != nil || sess == nil || sess.Item == nil || sess.Item.Status == "active" { return } // We got a valid session response for the session we just - // closed a connection for. Since there is a termination reason - // we can treat the session as being terminated so no more - // connections will be able to be established. + // closed a connection for. Since the status isn't active + // we can treat the session as no longer being able to + // suport connections so close this proxy. fin <- fmt.Errorf("session no longer active") listenerCloseFunc() p.cancel() From 4ce98b921cf5c3c0127add1535ed5941c33a3590 Mon Sep 17 00:00:00 2001 From: Todd Date: Fri, 31 May 2024 15:11:58 +0000 Subject: [PATCH 2/2] backport of commit d5c9d592b102a19f75c42aef593ad56d509f7139 --- api/proxy/proxy.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/proxy/proxy.go b/api/proxy/proxy.go index d276585c2b..68e9f7347e 100644 --- a/api/proxy/proxy.go +++ b/api/proxy/proxy.go @@ -280,7 +280,7 @@ func (p *ClientProxy) Start(opt ...Option) (retErr error) { // We got a valid session response for the session we just // closed a connection for. Since the status isn't active // we can treat the session as no longer being able to - // suport connections so close this proxy. + // support connections, so close this proxy. fin <- fmt.Errorf("session no longer active") listenerCloseFunc() p.cancel()