diff options
-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); + } } /** |