activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From gtu...@apache.org
Subject svn commit: r1170624 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Date Wed, 14 Sep 2011 13:49:25 GMT
Author: gtully
Date: Wed Sep 14 13:49:25 2011
New Revision: 1170624

URL: http://svn.apache.org/viewvc?rev=1170624&view=rev
Log:
https://issues.apache.org/jira/browse/AMQ-3499 - increase transport failure to warn and exclude
eof for stomp

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java?rev=1170624&r1=1170623&r2=1170624&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/broker/TransportConnection.java
Wed Sep 14 13:49:25 2011
@@ -16,6 +16,7 @@
  */
 package org.apache.activemq.broker;
 
+import java.io.EOFException;
 import java.io.IOException;
 import java.net.SocketException;
 import java.net.URI;
@@ -229,15 +230,16 @@ public class TransportConnection impleme
             transportException.set(e);
             if (TRANSPORTLOG.isDebugEnabled()) {
                 TRANSPORTLOG.debug("Transport failed: " + e, e);
-            } else if (TRANSPORTLOG.isInfoEnabled() && !expected(e)) {
-                TRANSPORTLOG.info("Transport failed: " + e);
+            } else if (TRANSPORTLOG.isWarnEnabled() && !expected(e)) {
+                TRANSPORTLOG.warn("Transport failed: " + e);
             }
             stopAsync();
         }
     }
 
     private boolean expected(IOException e) {
-        return  e instanceof SocketException && isStomp() && e.getMessage().indexOf("reset")
!= -1;
+        return  isStomp() &&
+                ((e instanceof SocketException && e.getMessage().indexOf("reset")
!= -1) || e instanceof EOFException);
     }
 
     private boolean isStomp() {



Mime
View raw message