You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by ma...@apache.org on 2023/06/16 13:51:46 UTC
[tomcat] branch main updated: Fix regression in fix for BZ 66574
This is an automated email from the ASF dual-hosted git repository.
markt 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 ea6d9cdcb9 Fix regression in fix for BZ 66574
ea6d9cdcb9 is described below
commit ea6d9cdcb949fc2c910058b162fb2e382abdabd7
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Fri Jun 16 14:50:28 2023 +0100
Fix regression in fix for BZ 66574
WebSocket session should report open until after the onClose event has
completed.
---
java/org/apache/tomcat/websocket/WsSession.java | 2 +-
webapps/docs/changelog.xml | 5 +++++
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/java/org/apache/tomcat/websocket/WsSession.java b/java/org/apache/tomcat/websocket/WsSession.java
index fc498b200f..0c75f92184 100644
--- a/java/org/apache/tomcat/websocket/WsSession.java
+++ b/java/org/apache/tomcat/websocket/WsSession.java
@@ -459,7 +459,7 @@ public class WsSession implements Session {
@Override
public boolean isOpen() {
- return state.get() == State.OPEN;
+ return state.get() == State.OPEN || state.get() == State.OUTPUT_CLOSING;
}
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 55acac0c04..d62963f0fd 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -141,6 +141,11 @@
Improve handling of error conditions for the WebSocket server,
particularly during Tomcat shutdown. (markt)
</fix>
+ <fix>
+ Correct a regression in the fix for <bug>66574</bug> that meant the
+ WebSocket session could return false for <code>onOpen()</code> before
+ the <code>onClose()</code> event had been completed. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Web applications">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org