You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@tomcat.apache.org by re...@apache.org on 2014/03/05 16:51:14 UTC

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

Author: remm
Date: Wed Mar  5 15:51:14 2014
New Revision: 1574543

URL: http://svn.apache.org/r1574543
Log:
Pick some of r1560702. Call onError if the onClose call throws an exception.

Modified:
    tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java
    tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml

Modified: tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java
URL: http://svn.apache.org/viewvc/tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java?rev=1574543&r1=1574542&r2=1574543&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java (original)
+++ tomcat/tc7.0.x/trunk/java/org/apache/tomcat/websocket/WsSession.java Wed Mar  5 15:51:14 2014
@@ -45,6 +45,7 @@ import javax.websocket.WebSocketContaine
 
 import org.apache.juli.logging.Log;
 import org.apache.juli.logging.LogFactory;
+import org.apache.tomcat.util.ExceptionUtils;
 import org.apache.tomcat.util.res.StringManager;
 
 public class WsSession implements Session {
@@ -456,6 +457,9 @@ public class WsSession implements Sessio
         t.setContextClassLoader(applicationClassLoader);
         try {
             localEndpoint.onClose(this, closeReason);
+        } catch (Throwable throwable) {
+            ExceptionUtils.handleThrowable(throwable);
+            localEndpoint.onError(this, throwable);
         } finally {
             t.setContextClassLoader(cl);
         }

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=1574543&r1=1574542&r2=1574543&view=diff
==============================================================================
--- tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml (original)
+++ tomcat/tc7.0.x/trunk/webapps/docs/changelog.xml Wed Mar  5 15:51:14 2014
@@ -105,6 +105,10 @@
         Avoid a possible deadlock when one thread is shutting down a connection
         while another thread is trying to write to it. (markt)
       </fix>
+      <fix>
+        Call onError if an exception is thrown calling onClose when closing
+        a session. (remm)
+      </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