mirror of
https://github.com/NoCheatPlus/NoCheatPlus.git
synced 2024-12-26 02:17:42 +01:00
Lost update...
This commit is contained in:
parent
78f453c5c2
commit
90783e290f
@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user