Mirror von
https://github.com/PaperMC/Velocity.git
synchronisiert 2024-11-17 05:20:14 +01:00
Make sure to schedule on the thread pool and not on the scheduler.
Dieser Commit ist enthalten in:
Ursprung
1e178cfe2a
Commit
01c1002249
@ -185,13 +185,14 @@ public class VelocityScheduler implements Scheduler {
|
||||
@Override
|
||||
public void cancel() {
|
||||
if (future != null) {
|
||||
future.cancel(true);
|
||||
future.cancel(false);
|
||||
onFinish();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void run() {
|
||||
taskService.execute(() -> {
|
||||
try {
|
||||
runnable.run();
|
||||
} catch (Exception e) {
|
||||
@ -202,6 +203,7 @@ public class VelocityScheduler implements Scheduler {
|
||||
Log.logger.error("Exception in task {} by plugin {}", runnable, plugin);
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void onFinish() {
|
||||
|
Laden…
In neuem Issue referenzieren
Einen Benutzer sperren