diff options
| author | Keith Wall <kwall@apache.org> | 2012-02-09 14:31:19 +0000 |
|---|---|---|
| committer | Keith Wall <kwall@apache.org> | 2012-02-09 14:31:19 +0000 |
| commit | 9ea403d9d1f8ce1b01dfe0cc6e7a4e76a27b38c4 (patch) | |
| tree | eb41a9c5755454acab5f0794f629d587437e84e7 /java/client/src | |
| parent | 565f56a0e126fc97618f5ef97a230f8fa4bb5cea (diff) | |
| download | qpid-python-9ea403d9d1f8ce1b01dfe0cc6e7a4e76a27b38c4.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/qpid@1242338 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java | 25 |
1 files changed, 1 insertions, 24 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java b/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java index 81902699ab..08ee7c3705 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQConnectionDelegate_8_0.java +++ b/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) |
