diff options
| author | Martin Ritchie <ritchiem@apache.org> | 2008-05-05 11:04:06 +0000 |
|---|---|---|
| committer | Martin Ritchie <ritchiem@apache.org> | 2008-05-05 11:04:06 +0000 |
| commit | 5960588d5e0694056723e46c0fd084405c68dbc1 (patch) | |
| tree | 38f17947bde5c08806a83228532fba2f2b54271d /java/client/src | |
| parent | e7fb61cf8df1844478bfea1e0e1fa31c14b3db96 (diff) | |
| download | qpid-python-5960588d5e0694056723e46c0fd084405c68dbc1.tar.gz | |
QPID-895 : Patch provided provided by Senaka to prevent delay on initial Connections with SingleServer methods. Updated FailoverMethodTest to include a better description of where the times come from. Also added a maximum time test to ensure that we don't miss any regression of this patch.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@653421 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/jms/failover/FailoverSingleServer.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverSingleServer.java b/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverSingleServer.java index b1bc3cee96..9fa006233b 100644 --- a/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverSingleServer.java +++ b/java/client/src/main/java/org/apache/qpid/jms/failover/FailoverSingleServer.java @@ -95,7 +95,7 @@ public class FailoverSingleServer implements FailoverMethod String delayStr = _brokerDetail.getProperty(BrokerDetails.OPTIONS_CONNECT_DELAY); - if (delayStr != null && _currentRetries != 1) + if (delayStr != null && _currentRetries > 0) { Long delay = Long.parseLong(delayStr); _logger.info("Delay between connect retries:" + delay); @@ -106,10 +106,13 @@ public class FailoverSingleServer implements FailoverMethod } catch (InterruptedException ie) { - _logger.info("No delay between connect retries, use tcp://host:port?connectdelay='value' to enable."); return null; } } + else + { + _logger.info("No delay between connect retries, use tcp://host:port?connectdelay='value' to enable."); + } return _brokerDetail; } |
