F-5776: set connectionClosed on all WolfSSLSocket.close() paths
parent
844c9a9013
commit
83d5e683ea
|
|
@ -2138,8 +2138,6 @@ public class WolfSSLSocket extends SSLSocket {
|
|||
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
|
||||
() -> "thread got handshakeLock");
|
||||
|
||||
this.connectionClosed = true;
|
||||
|
||||
/* Release native verify callback (JNI global) */
|
||||
if (this.EngineHelper != null) {
|
||||
this.EngineHelper.unsetVerifyCallback();
|
||||
|
|
@ -2216,6 +2214,12 @@ public class WolfSSLSocket extends SSLSocket {
|
|||
}
|
||||
}
|
||||
|
||||
/* Mark closed on every teardown path, before clearing
|
||||
* EngineHelper, so a later startHandshake() won't NPE. */
|
||||
synchronized (handshakeLock) {
|
||||
this.connectionClosed = true;
|
||||
}
|
||||
|
||||
/* Reset internal WolfSSLEngineHelper to null */
|
||||
if (this.EngineHelper != null) {
|
||||
this.EngineHelper.clearObjectState();
|
||||
|
|
|
|||
Loading…
Reference in New Issue