diff --git a/handshake_client.go b/handshake_client.go index eae1a42..088baa5 100644 --- a/handshake_client.go +++ b/handshake_client.go @@ -941,7 +941,11 @@ func (hs *clientHandshakeState) saveSessionTicket() error { session.secret = hs.masterSecret cs := &ClientSessionState{ticket: hs.ticket, session: session} - c.config.ClientSessionCache.Put(cacheKey, cs) + // [UTLS BEGIN] + if c.config.ClientSessionCache != nil { // skip saving session if cache is nil + c.config.ClientSessionCache.Put(cacheKey, cs) + } + // [UTLS END] return nil }