Author: markt Date: Thu Oct 3 13:32:52 2013 New Revision: 1528855 URL: http://svn.apache.org/r1528855 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/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java?rev=1528855&r1=1528854&r2=1528855&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsFrameClient.java Thu Oct 3 13:32:52 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); + } } } --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org