File tree Expand file tree Collapse file tree
src/java/com/wolfssl/provider/jsse Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1130,21 +1130,23 @@ synchronized public void startHandshake() throws IOException {
11301130 "entered startHandshake()" );
11311131
11321132 synchronized (handshakeLock ) {
1133- if (handshakeInitCalled == true || handshakeComplete == true ) {
1134- /* handshake already started or finished */
1133+ if (handshakeComplete == true ) {
1134+ /* handshake already finished */
11351135 return ;
11361136 }
1137+
1138+ if (handshakeInitCalled == false ) {
1139+ /* will throw SSLHandshakeException if session creation is
1140+ not allowed */
1141+ EngineHelper .initHandshake ();
1142+ handshakeInitCalled = true ;
1143+ }
11371144 }
11381145
11391146 synchronized (ioLock ) {
11401147 WolfSSLDebug .log (getClass (), WolfSSLDebug .INFO ,
11411148 "thread got ioLock (handshake)" );
11421149
1143- /* will throw SSLHandshakeException if session creation is
1144- not allowed */
1145- EngineHelper .initHandshake ();
1146- handshakeInitCalled = true ;
1147-
11481150 try {
11491151 ret = EngineHelper .doHandshake (0 , this .getSoTimeout ());
11501152 } catch (SocketTimeoutException e ) {
You can’t perform that action at this time.
0 commit comments