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

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

commit 41c425bed3df89b3c638c0b4207b9b8dd1474f09
Author: Mark Thomas <ma...@apache.org>
AuthorDate: Wed Aug 7 16:14:33 2024 +0100

    If a blocking message write times out, don't write again before throwing
---
 java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java | 1 +
 webapps/docs/changelog.xml                                       | 8 ++++++++
 2 files changed, 9 insertions(+)

diff --git a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java 
b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java
index 5f0cc67fc3..a66e585ac9 100644
--- a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java
+++ b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java
@@ -56,6 +56,7 @@ public class WsRemoteEndpointImplClient extends 
WsRemoteEndpointImplBase {
                 if (timeout < 0) {
                     SendResult sr = new SendResult(new 
IOException(sm.getString("wsRemoteEndpoint.writeTimeout")));
                     handler.onResult(sr);
+                    return;
                 }
             }
 
diff --git a/webapps/docs/changelog.xml b/webapps/docs/changelog.xml
index 18790f31e4..ecb625f525 100644
--- a/webapps/docs/changelog.xml
+++ b/webapps/docs/changelog.xml
@@ -113,6 +113,14 @@
       </fix>
     </changelog>
   </subsection>
+  <subsection name="WebSocket">
+    <changelog>
+      <fix>
+        If a blocking message write exceeds the timeout, don't attempt the 
write
+        again before throwing the exception. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Web applications">
     <changelog>
       <fix>


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

Reply via email to