add trys around canceling tasks to prevent breaking
This commit is contained in:
@@ -85,23 +85,33 @@ public class Manager {
|
|||||||
*/
|
*/
|
||||||
public void reloadIntervals() {
|
public void reloadIntervals() {
|
||||||
if(sendId != -1) {
|
if(sendId != -1) {
|
||||||
|
try {
|
||||||
pl.getProxy().getScheduler().cancel(sendId);
|
pl.getProxy().getScheduler().cancel(sendId);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
sendId = -1;
|
sendId = -1;
|
||||||
}
|
}
|
||||||
if(updateId != -1) {
|
if(updateId != -1) {
|
||||||
|
try {
|
||||||
pl.getProxy().getScheduler().cancel(updateId);
|
pl.getProxy().getScheduler().cancel(updateId);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
updateId = -1;
|
updateId = -1;
|
||||||
}
|
}
|
||||||
if(messagerId != -1) {
|
if(messagerId != -1) {
|
||||||
|
try {
|
||||||
pl.getProxy().getScheduler().cancel(messagerId);
|
pl.getProxy().getScheduler().cancel(messagerId);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
messagerId = -1;
|
messagerId = -1;
|
||||||
}
|
}
|
||||||
if(actionbarId != -1) {
|
if(actionbarId != -1) {
|
||||||
|
try {
|
||||||
pl.getProxy().getScheduler().cancel(actionbarId);
|
pl.getProxy().getScheduler().cancel(actionbarId);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
actionbarId = -1;
|
actionbarId = -1;
|
||||||
}
|
}
|
||||||
if(srvRefId != -1) {
|
if(srvRefId != -1) {
|
||||||
|
try {
|
||||||
pl.getProxy().getScheduler().cancel(srvRefId);
|
pl.getProxy().getScheduler().cancel(srvRefId);
|
||||||
|
} catch(IllegalArgumentException e) {}
|
||||||
srvRefId = -1;
|
srvRefId = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user