rmaucher commented on a change in pull request #246: OpenSSLEngine improvements
to guard against multiple shutdown() calls triggered by construction exception
and finalize() later
URL: https://github.com/apache/tomcat/pull/246#discussion_r381180570
##########
File path: java/org/apache/tomcat/util/net/openssl/OpenSSLEngine.java
##########
@@ -197,10 +198,8 @@
throw new
IllegalArgumentException(sm.getString("engine.noSSLContext"));
}
session = new OpenSSLSession();
- destroyed = true;
ssl = SSL.newSSL(sslCtx, !clientMode);
networkBIO = SSL.makeNetworkBIO(ssl);
- destroyed = false;
Review comment:
It's good to remove that, it is a hack. But I would tighten things up by
making ssl and networkBIO final. Then keep the if (networkBIO != 0) and if (ssl
!= 0) checks in destroy but drop the atomic boolean change.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]