You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by ch...@apache.org on 2012/09/13 19:41:37 UTC

svn commit: r1384424 - /activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

Author: chirino
Date: Thu Sep 13 17:41:37 2012
New Revision: 1384424

URL: http://svn.apache.org/viewvc?rev=1384424&view=rev
Log:
Make sure we don't log a transport error if the transport is gracefully disconnected.

Modified:
    activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala

Modified: activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
URL: http://svn.apache.org/viewvc/activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala?rev=1384424&r1=1384423&r2=1384424&view=diff
==============================================================================
--- activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala (original)
+++ activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala Thu Sep 13 17:41:37 2012
@@ -797,6 +797,14 @@ class StompProtocolHandler extends Proto
     resume_read
   }
 
+  override def on_transport_failure(error: IOException) = {
+    if( !closed ) {
+      suspend_read("shutdown")
+      connection_log.info("Shutting connection '%s'  down due to: %s", security_context.remote_address, error)
+    }
+    connection.stop(NOOP)
+  }
+
   override def on_transport_disconnected() = {
     if( !closed ) {
       heart_beat_monitor.stop
@@ -1499,16 +1507,6 @@ class StompProtocolHandler extends Proto
     }
   }
 
-
-  override def on_transport_failure(error: IOException) = {
-    if( !connection.stopped ) {
-      suspend_read("shutdown")
-      connection_log.info("Shutting connection '%s'  down due to: %s", security_context.remote_address, error)
-      super.on_transport_failure(error);
-    }
-  }
-
-
   def require_transaction_header[T](headers:HeaderMap):AsciiBuffer = {
     get(headers, TRANSACTION).getOrElse(die("transaction header not set"))
   }