Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 87b987c

Browse files
chrisvestnormanmaurer
authored andcommitted
Fix OpenSslClientSessionCache remove (#14366)
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
1 parent 0ec34c4 commit 87b987c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

handler/src/main/java/io/netty/handler/ssl/OpenSslClientSessionCache.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ boolean setSession(long ssl, OpenSslSession session, String host, int port) {
9999
if (toBeRemoved == null) {
100100
toBeRemoved = new ArrayList<NativeSslSession>(2);
101101
}
102-
toBeRemoved.add(nativeSslSession);
102+
toBeRemoved.add(sslSession);
103103
}
104104
}
105105

0 commit comments

Comments
 (0)