提交 ea8ffd55 编写于 作者: X xuelei

7065972: Some race condition may happen in SSLSocketImpl class

Reviewed-by: wetmore, weijun, dgu
上级 b6b4bb03
...@@ -2443,11 +2443,12 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl { ...@@ -2443,11 +2443,12 @@ final public class SSLSocketImpl extends BaseSSLSocketImpl {
entrySet, HandshakeCompletedEvent e) { entrySet, HandshakeCompletedEvent e) {
super("HandshakeCompletedNotify-Thread"); super("HandshakeCompletedNotify-Thread");
targets = entrySet; targets = new HashSet<>(entrySet); // clone the entry set
event = e; event = e;
} }
public void run() { public void run() {
// Don't need to synchronize, as it only runs in one thread.
for (Map.Entry<HandshakeCompletedListener,AccessControlContext> for (Map.Entry<HandshakeCompletedListener,AccessControlContext>
entry : targets) { entry : targets) {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册