Lost update...

This commit is contained in:
asofold 2013-06-30 03:03:43 +02:00
parent 78f453c5c2
commit 90783e290f

View File

@ -245,7 +245,7 @@ public class Metrics {
}
}
}, 0, PING_INTERVAL * 1200);
if (task.getTaskId() == -1){
if (task == null || task.getTaskId() == -1){
// NCP: Just in case.
task = null;
return false;
@ -327,8 +327,10 @@ public class Metrics {
*/
public void cancel(){
synchronized (optOutLock) {
task.cancel();
task = null;
if (task != null){
task.cancel();
task = null;
}
}
}