From 7c15007ed8206722793bc843d47d5655fcf66343 Mon Sep 17 00:00:00 2001 From: Robert Gemmell Date: Thu, 20 Oct 2011 15:49:03 +0000 Subject: 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 --- .../java/org/apache/qpid/transport/Session.java | 30 +++++++++------------- 1 file changed, 12 insertions(+), 18 deletions(-) (limited to 'java') 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(); } } } -- cgit v1.2.1