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 | cb3666e29b5f7fab191cc0092f61d7b6b7bef600 (patch) | |
| tree | fcf0656607340134d562a5de4e7b7311029e2515 /java/client/src | |
| parent | 0c3c1b4e6af766d659d7a26742f3089b0a03f0ae (diff) | |
| download | qpid-python-cb3666e29b5f7fab191cc0092f61d7b6b7bef600.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/qpid@632331 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'java/client/src')
| -rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/AMQSession.java | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java b/java/client/src/main/java/org/apache/qpid/client/AMQSession.java index 5a6d145295..e757747b7f 100644 --- a/java/client/src/main/java/org/apache/qpid/client/AMQSession.java +++ b/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; + } } /** |
