Author: markt
Date: Tue Oct  8 20:56:49 2013
New Revision: 1530418

URL: http://svn.apache.org/r1530418
Log:
Clear the handler then close the connection so the handler gets to the the 
exception that caused the problem rather than any exception that may happen 
during close.

Modified:
    
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java

Modified: 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
URL: 
http://svn.apache.org/viewvc/tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java?rev=1530418&r1=1530417&r2=1530418&view=diff
==============================================================================
--- 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 (original)
+++ 
tomcat/trunk/java/org/apache/tomcat/websocket/server/WsRemoteEndpointImplServer.java
 Tue Oct  8 20:56:49 2013
@@ -89,18 +89,18 @@ public class WsRemoteEndpointImplServer 
                 }
                 if (complete) {
                     wsWriteTimeout.unregister(this);
+                    clearHandler(null);
                     if (close) {
                         close();
                     }
-                    clearHandler(null);
                     break;
                 }
             }
 
         } catch (IOException ioe) {
             wsWriteTimeout.unregister(this);
-            close();
             clearHandler(ioe);
+            close();
         }
         if (!complete) {
             // Async write is in progress



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

Reply via email to