Author: markt Date: Wed Sep 3 12:16:41 2014 New Revision: 1622233 URL: http://svn.apache.org/r1622233 Log: Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=56907 Ensure that client IO threads are stopped if a secure WebSocket client connection fails.
Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java tomcat/trunk/webapps/docs/changelog.xml Modified: tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java URL: http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java?rev=1622233&r1=1622232&r2=1622233&view=diff ============================================================================== --- tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java (original) +++ tomcat/trunk/java/org/apache/tomcat/websocket/WsWebSocketContainer.java Wed Sep 3 12:16:41 2014 @@ -273,6 +273,7 @@ public class WsWebSocketContainer ByteBuffer response; String subProtocol; + boolean success = false; try { fConnect.get(timeout, TimeUnit.MILLISECONDS); @@ -310,10 +311,15 @@ public class WsWebSocketContainer throw new DeploymentException( sm.getString("Sec-WebSocket-Protocol")); } + success = true; } catch (ExecutionException | InterruptedException | SSLException | EOFException | TimeoutException e) { throw new DeploymentException( sm.getString("wsWebSocketContainer.httpRequestFailed"), e); + } finally { + if (!success) { + channel.close(); + } } // Switch to WebSocket Modified: tomcat/trunk/webapps/docs/changelog.xml URL: http://svn.apache.org/viewvc/tomcat/trunk/webapps/docs/changelog.xml?rev=1622233&r1=1622232&r2=1622233&view=diff ============================================================================== --- tomcat/trunk/webapps/docs/changelog.xml (original) +++ tomcat/trunk/webapps/docs/changelog.xml Wed Sep 3 12:16:41 2014 @@ -112,6 +112,14 @@ </fix> </changelog> </subsection> + <subsection name="WebSocket"> + <changelog> + <fix> + <bug>56907</bug>: Ensure that client IO threads are stopped if a secure + WebSocket client connection fails. (markt) + </fix> + </changelog> + </subsection> </section> <section name="Tomcat 8.0.12 (markt)"> <subsection name="Catalina"> --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org For additional commands, e-mail: dev-h...@tomcat.apache.org