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

markt-asf 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 deb17cff01 Align with 12.0.x
deb17cff01 is described below

commit deb17cff0125de4d2bc886eb962d4bf83f388f35
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 3 12:23:09 2026 +0100

    Align with 12.0.x
---
 java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java 
b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
index 9b71519ef5..f18b61927d 100644
--- a/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
+++ b/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
@@ -454,15 +454,17 @@ public abstract class WsRemoteEndpointImplBase implements 
RemoteEndpoint {
         } catch (IOException ioe) {
             if (handler != null) {
                 handler.onResult(new SendResult(ioe));
-                return;
             }
+            return;
         }
 
         // Some extensions/transformations may buffer messages so it is 
possible
         // that no message parts will be returned. If this is the case the
         // trigger the supplied SendHandler
         if (messageParts.size() == 0) {
-            handler.onResult(new SendResult());
+            if (handler != null) {
+                handler.onResult(new SendResult());
+            }
             return;
         }
 


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

Reply via email to