diff options
| author | Arnaud Simon <arnaudsimon@apache.org> | 2008-02-29 14:36:38 +0000 |
|---|---|---|
| committer | Arnaud Simon <arnaudsimon@apache.org> | 2008-02-29 14:36:38 +0000 |
| commit | 3a2b5b2ddfcf6efcd6cdf4b71c3eb67a124f67fd (patch) | |
| tree | dfa1bff9a8bbdcbab57ddf0dc1f2d3a6b7767e22 | |
| parent | e7061d000fa4812753d4a24ae1d2431172dd7200 (diff) | |
| download | qpid-python-3a2b5b2ddfcf6efcd6cdf4b71c3eb67a124f67fd.tar.gz | |
Qpid-823: Dispatcher thread should be closed after consumers have been closed.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk@632331 13f79535-47bb-0310-9956-ffa450edef68
| -rw-r--r-- | qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java index 5a6d145295..e757747b7f 100644 --- a/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java +++ b/qpid/java/client/src/main/java/org/apache/qpid/client/AMQSession.java @@ -1774,11 +1774,6 @@ public abstract class AMQSession extends Closeable implements Session, QueueSess */ private void closeConsumers(Throwable error) throws JMSException { - if (_dispatcher != null) - { - _dispatcher.close(); - _dispatcher = null; - } // we need to clone the list of consumers since the close() method updates the _consumers collection // which would result in a concurrent modification exception final ArrayList<BasicMessageConsumer> clonedConsumers = new ArrayList<BasicMessageConsumer>(_consumers.values()); @@ -1797,6 +1792,11 @@ public abstract class AMQSession extends Closeable implements Session, QueueSess } } // at this point the _consumers map will be empty + if (_dispatcher != null) + { + _dispatcher.close(); + _dispatcher = null; + } } /** |
