Skip to content

Commit

Permalink
Fix CloneClient helper
Browse files Browse the repository at this point in the history
  • Loading branch information
espadolini committed Oct 30, 2024
1 parent fbaa923 commit ec830f7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/auth/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -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)
}

Expand Down

0 comments on commit ec830f7

Please sign in to comment.