From ec830f78a7676095991cbefe4167d6612a04f61f Mon Sep 17 00:00:00 2001 From: Edoardo Spadolini Date: Wed, 30 Oct 2024 16:32:45 +0100 Subject: [PATCH] Fix CloneClient helper --- lib/auth/helpers.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/auth/helpers.go b/lib/auth/helpers.go index ba403790d0675..99818886c00dc 100644 --- a/lib/auth/helpers.go +++ b/lib/auth/helpers.go @@ -1098,7 +1098,8 @@ func (t *TestTLSServer) CloneClient(tt *testing.T, clt *authclient.Client) *auth // shared between all clients that use the same TLS config. // Reusing the cache will skip the TLS handshake and may introduce a weird // behavior in tests. - if !tlsConfig.SessionTicketsDisabled { + if tlsConfig.ClientSessionCache != nil { + tlsConfig = tlsConfig.Clone() tlsConfig.ClientSessionCache = tls.NewLRUClientSessionCache(utils.DefaultLRUCapacity) }