diff options
author | Robert Gemmell <robbie@apache.org> | 2011-10-20 15:49:03 +0000 |
---|---|---|
committer | Robert Gemmell <robbie@apache.org> | 2011-10-20 15:49:03 +0000 |
commit | 7c15007ed8206722793bc843d47d5655fcf66343 (patch) | |
tree | 08a8fcf8a76af2b632e0ea4b77455a9d82930819 | |
parent | 96bf9afa37cf5288548936a221dc05f3502ed26a (diff) | |
download | qpid-python-7c15007ed8206722793bc843d47d5655fcf66343.tar.gz |
QPID-3524: revert changes to Session#invoke method in r1179702 as the other changes in the resume method rendered them unecessary
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1186863 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/common/src/main/java/org/apache/qpid/transport/Session.java | 30 |
1 files changed, 12 insertions, 18 deletions
diff --git a/java/common/src/main/java/org/apache/qpid/transport/Session.java b/java/common/src/main/java/org/apache/qpid/transport/Session.java index 0de558d152..b732191707 100644 --- a/java/common/src/main/java/org/apache/qpid/transport/Session.java +++ b/java/common/src/main/java/org/apache/qpid/transport/Session.java @@ -583,30 +583,24 @@ public class Session extends SessionInvoker synchronized (commands) { - //allow the txSelect operation to be invoked during resume - boolean skipWait = m instanceof TxSelect && state == RESUMING; - - if(!skipWait) + if (state == DETACHED && m.isUnreliable()) { - if (state == DETACHED && m.isUnreliable()) + Thread current = Thread.currentThread(); + if (!current.equals(resumer)) { - Thread current = Thread.currentThread(); - if (!current.equals(resumer)) - { - return; - } + return; } + } - if (state != OPEN && state != CLOSED && state != CLOSING) + if (state != OPEN && state != CLOSED && state != CLOSING) + { + Thread current = Thread.currentThread(); + if (!current.equals(resumer)) { - Thread current = Thread.currentThread(); - if (!current.equals(resumer)) + Waiter w = new Waiter(commands, timeout); + while (w.hasTime() && (state != OPEN && state != CLOSED)) { - Waiter w = new Waiter(commands, timeout); - while (w.hasTime() && (state != OPEN && state != CLOSED)) - { - w.await(); - } + w.await(); } } } |