|
@@ -91,14 +91,16 @@ public class AsyncDispatcher extends AbstractService implements Dispatcher {
|
|
|
@Override
|
|
|
public void stop() {
|
|
|
stopped = true;
|
|
|
- eventHandlingThread.interrupt();
|
|
|
- try {
|
|
|
- eventHandlingThread.join();
|
|
|
- } catch (InterruptedException ie) {
|
|
|
- LOG.debug("Interruped Exception while stopping", ie);
|
|
|
+ if (eventHandlingThread != null) {
|
|
|
+ eventHandlingThread.interrupt();
|
|
|
+ try {
|
|
|
+ eventHandlingThread.join();
|
|
|
+ } catch (InterruptedException ie) {
|
|
|
+ LOG.debug("Interrupted Exception while stopping", ie);
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
- //stop all the components
|
|
|
+ // stop all the components
|
|
|
super.stop();
|
|
|
}
|
|
|
|