Fix null pointer exception in doStop()

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@946681 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Davies 2010-05-20 16:06:48 +00:00
parent 1a5ad284ed
commit cd6f4f5650
1 changed files with 6 additions and 2 deletions

View File

@ -182,8 +182,12 @@ public class KahaDBStore extends MessageDatabase implements PersistenceAdapter {
@Override
public void doStop(ServiceStopper stopper) throws Exception {
if (this.queueSemaphore != null) {
this.queueSemaphore.drainPermits();
}
if (this.topicSemaphore != null) {
this.topicSemaphore.drainPermits();
}
if (this.queueExecutor != null) {
this.queueExecutor.shutdownNow();
}