You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by vi...@apache.org on 2014/09/13 07:39:19 UTC
svn commit: r1624698 - in /tomcat/tc7.0.x/trunk: ./
java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java
webapps/docs/changelog.xml
Author: violetagg
Date: Sat Sep 13 05:39:19 2014
New Revision: 1624698
URL: http://svn.apache.org/r1624698
Log:
Merged revision 1597652 from tomcat/trunk:
ISE is expected when using AsyncChannels. Handle it the same way an IOException is handled rather than expecting the client code to catch and handle it.
Modified:
tomcat/tc7.0.x/trunk/ (props changed)
tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java
tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml
Propchange: tomcat/tc7.0.x/trunk/
------------------------------------------------------------------------------
Merged /tomcat/trunk:r1597652
Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java?rev=1624698&r1=1624697&r2=1624698&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsRemoteEndpointImplClient.java Sat Sep 13 05:39:19 2014
@@ -45,8 +45,12 @@ public class WsRemoteEndpointImplClient
}
SendHandlerToCompletionHandler sh2ch =
new SendHandlerToCompletionHandler(handler);
- channel.write(data, 0, data.length, timeout, TimeUnit.MILLISECONDS,
- null, sh2ch);
+ try {
+ channel.write(data, 0, data.length, timeout, TimeUnit.MILLISECONDS,
+ null, sh2ch);
+ } catch (IllegalStateException ise) {
+ sh2ch.failed(ise, null);
+ }
}
@Override
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=1624698&r1=1624697&r2=1624698&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Sat Sep 13 05:39:19 2014
@@ -236,6 +236,11 @@
<bug>56907</bug>: Ensure that client IO threads are stopped if a secure
WebSocket client connection fails. (markt)
</fix>
+ <fix>
+ When a WebSocket client attempts to write to a closed connection, handle
+ the resulting <code>IllegalStateException</code> in a manner consistent
+ with the handling of an <code>IOException</code>. (markt)
+ </fix>
</changelog>
</subsection>
<subsection name="Web applications">
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org