PaperBackupManager: ignore CancellationException in async task

This commit is contained in:
Marc Baloup 2024-01-21 13:53:16 +01:00
parent 90009b8703
commit ece1bc70bf

View File

@ -21,6 +21,7 @@ import java.util.HashMap;
import java.util.HashSet; import java.util.HashSet;
import java.util.Map; import java.util.Map;
import java.util.Set; import java.util.Set;
import java.util.concurrent.CancellationException;
public class PaperBackupManager extends BackupManager implements Listener { public class PaperBackupManager extends BackupManager implements Listener {
@ -76,7 +77,9 @@ public class PaperBackupManager extends BackupManager implements Listener {
public void run() { public void run() {
try { try {
SchedulerUtil.runOnServerThreadAndWait(super::run); SchedulerUtil.runOnServerThreadAndWait(super::run);
} catch (Exception e) { } catch (CancellationException ignored) {
} catch (Exception e) {
throw new RuntimeException(e); throw new RuntimeException(e);
} }
} }