This is an automated email from the ASF dual-hosted git repository.
rmaucher pushed a commit to branch 11.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/11.0.x by this push:
new fa5b882612 Fix inverted isDone in returned Future
fa5b882612 is described below
commit fa5b8826120d7e6ac9c10246ca84a78ac530addf
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 b026464ded..f3e34018aa 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -168,6 +168,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]