From 515327fab94bbbf5f2be1eac097c90754979131f Mon Sep 17 00:00:00 2001 From: Martin Ritchie Date: Wed, 19 Mar 2008 17:42:42 +0000 Subject: QPID-862 : Add IOException to valid reason to start failover and removed the propogation of the error to client, as they don't need to know of the error unless failover fails. git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@638950 13f79535-47bb-0310-9956-ffa450edef68 --- .../main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java index 7909663f24..9f2ba1d84d 100644 --- a/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java +++ b/java/client/src/main/java/org/apache/qpid/client/protocol/AMQProtocolHandler.java @@ -54,6 +54,7 @@ import org.apache.qpid.ssl.SSLContextFactory; import org.slf4j.Logger; import org.slf4j.LoggerFactory; +import java.io.IOException; import java.util.Iterator; import java.util.Set; import java.util.concurrent.CopyOnWriteArraySet; @@ -355,13 +356,12 @@ public class AMQProtocolHandler extends IoHandlerAdapter if (_failoverState == FailoverState.NOT_STARTED) { // if (!(cause instanceof AMQUndeliveredException) && (!(cause instanceof AMQAuthenticationException))) - if (cause instanceof AMQConnectionClosedException) + if ((cause instanceof AMQConnectionClosedException) || cause instanceof IOException) { _logger.info("Exception caught therefore going to attempt failover: " + cause, cause); // this will attemp failover sessionClosed(session); - _connection.exceptionReceived(cause); } else { -- cgit v1.2.1