Skip to content

Commit

Permalink
Fix OpenSslClientSessionCache remove (#14366)
Browse files Browse the repository at this point in the history
Motivation:
Loop was adding `nativeSslSession` to the `toBeRemoved` list, instead of
the loop variable `sslSession`.

Modification:
Add the loop variable instead, because the `nativeSslSession` can very
likely be null at that point, and is specifically also not the session
we want to remove.

Result:
Fewer bugs in SSL session caching
  • Loading branch information
chrisvest authored Sep 24, 2024
1 parent ddbac87 commit bbd3a4a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ boolean setSession(long ssl, OpenSslSession session, String host, int port) {
if (toBeRemoved == null) {
toBeRemoved = new ArrayList<NativeSslSession>(2);
}
toBeRemoved.add(nativeSslSession);
toBeRemoved.add(sslSession);
}
}

Expand Down

0 comments on commit bbd3a4a

Please sign in to comment.