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/03 15:39:14 UTC

svn commit: r1528858 - in /tomcat/tc7.0.x/trunk: ./ java/org/apache/tomcat/websocket/WsFrameClient.java webapps/docs/changelog.xml

Author: markt
Date: Thu Oct  3 13:39:14 2013
New Revision: 1528858

URL: http://svn.apache.org/r1528858
Log:
Only send a close message on an IOException if the client has not yet received a close control message from the server as the IOException may be in response to the client continuing to send a message after the server sent a close control message. This change is in response to an observed failure in the unit tests.

Modified:
    tomcat/tc7.0.x/trunk/   (props changed)
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
  Merged /tomcat/trunk:r1528855

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java?rev=1528858&r1=1528857&r2=1528858&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java Thu Oct  3 13:39:14 2013
@@ -102,7 +102,14 @@ public class WsFrameClient extends WsFra
             try {
                 processSocketRead();
             } catch (IOException e) {
-                close(e);
+                // Only send a close message on an IOException if the client
+                // has not yet received a close control message from the server
+                // as the IOException may be in response to the client
+                // continuing to send a message after the server sent a close
+                // control message.
+                if (isOpen()) {
+                    close(e);
+                }
             }
         }
 

Modified: tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml?rev=1528858&r1=1528857&r2=1528858&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Thu Oct  3 13:39:14 2013
@@ -56,6 +56,16 @@
   issues to not "pop up" wrt. others).
 -->
 <section name="Tomcat 7.0.46 (violetagg)">
+  <subsection name="Catalina">
+    <changelog>
+      <fix>
+        Only send a WebSocket close message on an IOException if the client has
+        not yet received a close control message from the server as the
+        IOException may be in response to the client continuing to send a
+        message after the server sent a close control message. (markt)
+      </fix>
+    </changelog>
+  </subsection>
   <subsection name="Coyote">
     <changelog>
       <scode>



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