This is an automated email from the ASF dual-hosted git repository.

remm pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/main by this push:
     new 075694ab2d Port tweak to avoid counting down if not initialized
075694ab2d is described below

commit 075694ab2d5a979eefca5bba273c72c5d785ce68
Author: remm <r...@apache.org>
AuthorDate: Fri Jun 14 23:15:53 2024 +0200

    Port tweak to avoid counting down if not initialized
---
 java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java 
b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
index f4501c7fa6..262e97b671 100644
--- a/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
+++ b/java/org/apache/tomcat/util/net/openssl/panama/OpenSSLLibrary.java
@@ -334,11 +334,11 @@ public class OpenSSLLibrary {
 
     public static void destroy() {
         synchronized (lock) {
-            if (--referenceCount != 0) {
-                // Still being used (note test is performed after reference 
count is decremented)
+            if (!OpenSSLStatus.isInitialized()) {
                 return;
             }
-            if (!OpenSSLStatus.isInitialized()) {
+            if (--referenceCount != 0) {
+                // Still being used (note test is performed after reference 
count is decremented)
                 return;
             }
             OpenSSLStatus.setAvailable(false);


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org
For additional commands, e-mail: dev-h...@tomcat.apache.org

Reply via email to