mirror of
https://e.coding.net/circlecloud/Yum.git
synced 2024-12-22 20:58:47 +00:00
fix: 自动重置线程计数器
Signed-off-by: 502647092 <admin@yumc.pw>
This commit is contained in:
parent
a236157ec3
commit
29d17a43e3
@ -43,7 +43,6 @@ public class Yum extends JavaPlugin {
|
||||
@Override
|
||||
public void onDisable() {
|
||||
NetworkManager.unregister();
|
||||
tt.cancel();
|
||||
}
|
||||
|
||||
@Override
|
||||
@ -114,6 +113,9 @@ public class Yum extends JavaPlugin {
|
||||
// 需要在主线程注册任务
|
||||
if (ConfigManager.i().isMainThreadCheck() && mainThread != null) {
|
||||
PluginKit.scp("§aIO管理系统已启用...");
|
||||
if (tt != null) {
|
||||
tt.cancel();
|
||||
}
|
||||
task.scheduleAtFixedRate(tt = new MainThreadCheckTask(mainThread), 0, 5000);
|
||||
}
|
||||
}
|
||||
|
@ -66,6 +66,8 @@ public class MainThreadCheckTask extends TimerTask {
|
||||
} else {
|
||||
stopTime = 0;
|
||||
}
|
||||
} else {
|
||||
stopTime = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user