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 48b5569b8f Simplify
48b5569b8f is described below

commit 48b5569b8fe0b6f9c091789e04fdc65c3590a58b
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 7892ee5d22..8ea0b9cf73 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