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

rmaucher pushed a commit to branch 10.1.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git


The following commit(s) were added to refs/heads/10.1.x by this push:
     new cf6fe33fe3 Fix inverted isDone in returned Future
cf6fe33fe3 is described below

commit cf6fe33fe3ea32a04730b1f67888844f75466e73
Author: remm <[email protected]>
AuthorDate: Tue May 19 12:50:35 2026 +0200

    Fix inverted isDone in returned Future
    
    Identified by my code scanning.
---
 java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java | 2 +-
 webapps/docs/changelog.xml                                      | 8 ++++++++
 2 files changed, 9 insertions(+), 1 deletion(-)

diff --git a/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java 
b/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
index 9d5d75e8b7..8e7c82430b 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
@@ -479,7 +479,7 @@ public class AsyncChannelWrapperSecure implements 
AsyncChannelWrapper {
 
         @Override
         public final boolean isDone() {
-            return completionLatch.getCount() > 0;
+            return completionLatch.getCount() == 0;
         }
 
         @Override
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 7449af1f82..48ca07d352 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -164,6 +164,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="WebSocket">
+    <changelog>
+      <fix>
+        Incorrect <code>Future.isDone()</code> return by
+        <code>AsyncChannelWrapperSecure</code>. (remm)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Web applications">
     <changelog>
       <add>


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to