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

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


The following commit(s) were added to refs/heads/10.1.x by this push:
     new f273ac52e3 Simplify
f273ac52e3 is described below

commit f273ac52e30e88c9c85f3a7f858709c73796ae3f
Author: Mark Thomas <[email protected]>
AuthorDate: Thu Sep 3 11:00:54 2026 +0100

    Simplify
---
 .../tomcat/websocket/server/WsRemoteEndpointImplServer.java  | 12 +++++-------
 1 file changed, 5 insertions(+), 7 deletions(-)

diff --git 
a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java 
b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
index 8506a72c77..fdf1df0d08 100644
--- a/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
+++ b/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
@@ -319,13 +319,11 @@ public class WsRemoteEndpointImplServer extends 
WsRemoteEndpointImplBase {
 
     @Override
     protected void doClose() {
-        if (handler != null) {
-            // close() can be triggered by a wide range of scenarios. It is far
-            // simpler just to always use a dispatch than it is to try and 
track
-            // whether or not this method was called by the same thread that
-            // triggered the write
-            clearHandler(new EOFException(), true);
-        }
+        /*
+         * close() can be triggered by a wide range of scenarios. It is far 
simpler just to always use a dispatch than
+         * it is to try and track whether or not this method was called by the 
same thread that triggered the write
+         */
+        clearHandler(new EOFException(), true);
         try {
             socketWrapper.close();
         } catch (Exception e) {


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

Reply via email to