summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMartin Ritchie <ritchiem@apache.org>2007-10-03 15:26:10 +0000
committerMartin Ritchie <ritchiem@apache.org>2007-10-03 15:26:10 +0000
commit34b1fef825e94c6ee378206f92634f3843e75723 (patch)
tree618f2a7e3804b7aee5f65ee6345e4d01d583154f
parent5e82821be5de97a41fe1f701e47384bf4ada2bb6 (diff)
downloadqpid-python-34b1fef825e94c6ee378206f92634f3843e75723.tar.gz
QPID-614 : Applied supplementary patch from Aidan Skinner.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/branches/M2.1@581627 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java42
1 files changed, 22 insertions, 20 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
index 15a4257136..c64f46ba23 100644
--- a/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
+++ b/java/client/src/main/java/org/apache/qpid/client/protocol/BlockingMethodFrameListener.java
@@ -180,31 +180,33 @@ public abstract class BlockingMethodFrameListener implements AMQMethodListener
{
while (!_ready)
{
- if (timeout == -1)
- {
- _receivedCondition.await();
- }
- else
- {
- nanoTimeout = _receivedCondition.awaitNanos(nanoTimeout);
-
- if (nanoTimeout <= 0 && !_ready && _error == null)
+ try {
+ if (timeout == -1)
+ {
+ _receivedCondition.await();
+ }
+ else
{
- _error = new AMQTimeoutException("Server did not respond in a timely fashion");
- _ready = true;
+ nanoTimeout = _receivedCondition.awaitNanos(nanoTimeout);
+
+ if (nanoTimeout <= 0 && !_ready && _error == null)
+ {
+ _error = new AMQTimeoutException("Server did not respond in a timely fashion");
+ _ready = true;
+ }
}
+ }
+ catch (InterruptedException e)
+ {
+ // IGNORE -- //fixme this isn't ideal as being interrupted isn't equivellant to sucess
+ // if (!_ready && timeout != -1)
+ // {
+ // _error = new AMQException("Server did not respond timely");
+ // _ready = true;
+ // }
}
}
}
- catch (InterruptedException e)
- {
- // IGNORE -- //fixme this isn't ideal as being interrupted isn't equivellant to sucess
- // if (!_ready && timeout != -1)
- // {
- // _error = new AMQException("Server did not respond timely");
- // _ready = true;
- // }
- }
finally
{
_lock.unlock();