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) }