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 2013/10/10 09:42:38 UTC

svn commit: r1530866 - /tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

Author: markt
Date: Thu Oct 10 07:42:37 2013
New Revision: 1530866

URL: http://svn.apache.org/r1530866
Log:
Avoid stacktrace in logs if the session closes due to an IO error in the middle of sending a partial message.

Modified:
    tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java

Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java
URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java?rev=1530866&r1=1530865&r2=1530866&view=diff
==============================================================================
--- tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java (original)
+++ tomcat/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplBase.java Thu Oct 10 07:42:37 2013
@@ -275,7 +275,11 @@ public abstract class WsRemoteEndpointIm
             MessagePart mpNext = messagePartQueue.poll();
             if (mpNext == null) {
                 messagePartInProgress = false;
-            } else {
+            } else if (!closed){
+                // Session may have been closed unexpectedly in the middle of
+                // sending a fragmented message closing the endpoint. If this
+                // happens, clearly there is no point trying to send the rest of
+                // the message.
                 writeMessagePart(mpNext);
             }
         }



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