Commit 11f63f6b authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gato

Fixed NPE.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@6392 b35dd754-fafc-0310-a699-88a17e54d16e
parent 8b3aa9d6
......@@ -10,13 +10,13 @@
package org.jivesoftware.util;
import java.util.Date;
import java.util.Timer;
import java.util.TimerTask;
import java.util.Date;
import java.util.concurrent.Executors;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;
import java.util.concurrent.Future;
import java.util.concurrent.ThreadFactory;
import java.util.concurrent.atomic.AtomicInteger;
/**
......@@ -252,11 +252,15 @@ public class TaskEngine {
* Shuts down the task engine service.
*/
public void shutdown() {
executor.shutdownNow();
executor = null;
if (executor != null) {
executor.shutdownNow();
executor = null;
}
timer.cancel();
timer = null;
if (timer != null) {
timer.cancel();
timer = null;
}
}
/**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment