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

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


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

commit 4228ecaa640c01189d9df155164bb92c07b8a548
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 ef7a44919d..5cf267a230 100644
--- a/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
+++ b/java/org/apache/tomcat/websocket/AsyncChannelWrapperSecure.java
@@ -476,7 +476,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 78a93b8ec8..277abe3eda 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -160,6 +160,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