Skip to content

Commit

Permalink
remove check socket closed check
Browse files Browse the repository at this point in the history
  • Loading branch information
sstefonic committed Jun 27, 2024
1 parent b0e7bf3 commit ab159d4
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions src/java/com/wolfssl/provider/jsse/WolfSSLSocket.java
Original file line number Diff line number Diff line change
Expand Up @@ -1299,15 +1299,13 @@ public synchronized SSLSession getSession() {
"Handshake attempt failed in SSLSocket.getSession()");

/* close SSLSocket */
if (this.socket != null && !this.socket.isClosed()) {
try {
close();
} catch (Exception ex) {
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
"close attempt failed in SSLSocket.getSession(): " +
ex);
}
try {
close();
} catch (Exception ex) {
WolfSSLDebug.log(getClass(), WolfSSLDebug.INFO,
"close attempt failed in SSLSocket.getSession(): " + ex);
}

/* return invalid session object with cipher suite
* "SSL_NULL_WITH_NULL_NULL" */
return new WolfSSLImplementSSLSession(this.authStore);
Expand Down

0 comments on commit ab159d4

Please sign in to comment.