Skip to content

Commit

Permalink
Fix removing session state (#236)
Browse files Browse the repository at this point in the history
Probably we should check that state is nil rather than the map?
  • Loading branch information
own2pwn authored Aug 28, 2023
1 parent 8094658 commit f255bcb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/tls-resumption/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ func (csc *ClientSessionCache) Get(sessionKey string) (session *tls.ClientSessio
}

func (csc *ClientSessionCache) Put(sessionKey string, cs *tls.ClientSessionState) {
if csc.sessionKeyMap == nil {
if cs == nil {
fmt.Printf("Deleting session for %s\n", sessionKey)
delete(csc.sessionKeyMap, sessionKey)
} else {
Expand Down

0 comments on commit f255bcb

Please sign in to comment.