diff options
author | Martin Ritchie <ritchiem@apache.org> | 2007-02-05 08:58:30 +0000 |
---|---|---|
committer | Martin Ritchie <ritchiem@apache.org> | 2007-02-05 08:58:30 +0000 |
commit | 3da36fe4417019b417217e8feb22b8de11cbed0a (patch) | |
tree | eb0cfdcf520e8175cc14824f1fb10efb42f31dd0 | |
parent | 9b9af0fcc722c29777be5e69071e9453703478c3 (diff) | |
download | qpid-python-3da36fe4417019b417217e8feb22b8de11cbed0a.tar.gz |
Fixed bug in stop(). If a connection is opened not start()ed then closed a NullPointerException will be thrown as the Dispatcher has not been created.
git-svn-id: https://svn.apache.org/repos/asf/incubator/qpid/trunk/qpid@503593 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r-- | java/client/src/main/java/org/apache/qpid/client/AMQSession.java | 6 |
1 files changed, 5 insertions, 1 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 0feeaf1b63..35530b39c9 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 @@ -1652,7 +1652,11 @@ public class AMQSession extends Closeable implements Session, QueueSession, Topi { //stop the server delivering messages to this session suspendChannel(); - _dispatcher.setConnectionStopped(true); + + if (_dispatcher != null) + { + _dispatcher.setConnectionStopped(true); + } } /** |