activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chir...@apache.org
Subject svn commit: r1384424 - /activemq/activemq-apollo/trunk/apollo-stomp/src/main/scala/org/apache/activemq/apollo/stomp/StompProtocolHandler.scala
Date Thu, 13 Sep 2012 17:41:37 GMT
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"))
   }



Mime
View raw message