Skip to content

Commit

Permalink
fix: don't deref nil ptr (#214)
Browse files Browse the repository at this point in the history
  • Loading branch information
3andne authored Aug 9, 2023
1 parent 835e073 commit 30a2200
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion u_parrots.go
Original file line number Diff line number Diff line change
Expand Up @@ -2092,7 +2092,9 @@ func (uconn *UConn) ApplyPreset(p *ClientHelloSpec) error {
if session == nil && uconn.config.ClientSessionCache != nil {
cacheKey := uconn.clientSessionCacheKey()
cs, _ = uconn.config.ClientSessionCache.Get(cacheKey)
session = cs.session
if cs != nil {
session = cs.session
}
// TODO: use uconn.loadSession(hello.getPrivateObj()) to support TLS 1.3 PSK-style resumption
}
err := uconn.SetSessionState(cs)
Expand Down

0 comments on commit 30a2200

Please sign in to comment.