summaryrefslogtreecommitdiff
path: root/qpid/java/client
diff options
context:
space:
mode:
authorKeith Wall <kwall@apache.org>2012-02-09 14:31:19 +0000
committerKeith Wall <kwall@apache.org>2012-02-09 14:31:19 +0000
commit2a4198a70b0cbdd86d51dddc9a908d25ef55e9bd (patch)
tree83b517ff35e060472d85b96d30298b9efa55cd02 /qpid/java/client
parent8a5695ca3de2cff13e02c4b4fd39b864b4cf8004 (diff)
downloadqpid-python-2a4198a70b0cbdd86d51dddc9a908d25ef55e9bd.tar.gz
QPID-3819: ExhaustiveACLTests seen to timeout
Backout changes to AMQStateManager made by QPID-3512 as these changes were causing the client to hang for 30 seconds after the Broker closed connection due to ACL violation. Refactored ConnectionCloseTest (now called BrokerClosesClientConnectionTest) to avoid the sporadic failure by verifying that the closed connection is reported correctly to the client. git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@1242338 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/java/client')
-rw-r--r--qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java25
1 files changed, 1 insertions, 24 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
index 81902699ab..08ee7c3705 100644
--- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
+++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java
@@ -71,30 +71,7 @@ public class AMQConnectionDelegate_8_0 implements AMQConnectionDelegate
public void closeConnection(long timeout) throws JMSException, AMQException
{
- final AMQStateManager stateManager = _conn.getProtocolHandler().getStateManager();
- final AMQState currentState = stateManager.getCurrentState();
-
- if (currentState.equals(AMQState.CONNECTION_CLOSED))
- {
- _logger.debug("Connection already closed.");
- }
- else if (currentState.equals(AMQState.CONNECTION_CLOSING))
- {
- _logger.debug("Connection already closing, awaiting closed state.");
- final StateWaiter closeWaiter = new StateWaiter(stateManager, currentState, EnumSet.of(AMQState.CONNECTION_CLOSED));
- try
- {
- closeWaiter.await(timeout);
- }
- catch (AMQTimeoutException te)
- {
- throw new AMQTimeoutException("Close did not complete in timely fashion", te);
- }
- }
- else
- {
- _conn.getProtocolHandler().closeConnection(timeout);
- }
+ _conn.getProtocolHandler().closeConnection(timeout);
}
public AMQConnectionDelegate_8_0(AMQConnection conn)