From ece1bc70bf91ff149fbb3adf932b143654ac8131 Mon Sep 17 00:00:00 2001 From: Marc Baloup Date: Sun, 21 Jan 2024 13:53:16 +0100 Subject: [PATCH] PaperBackupManager: ignore CancellationException in async task --- .../fr/pandacube/lib/paper/backup/PaperBackupManager.java | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/backup/PaperBackupManager.java b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/backup/PaperBackupManager.java index 354bc62..b986eb8 100644 --- a/pandalib-paper/src/main/java/fr/pandacube/lib/paper/backup/PaperBackupManager.java +++ b/pandalib-paper/src/main/java/fr/pandacube/lib/paper/backup/PaperBackupManager.java @@ -21,6 +21,7 @@ import java.util.HashMap; import java.util.HashSet; import java.util.Map; import java.util.Set; +import java.util.concurrent.CancellationException; public class PaperBackupManager extends BackupManager implements Listener { @@ -76,7 +77,9 @@ public class PaperBackupManager extends BackupManager implements Listener { public void run() { try { SchedulerUtil.runOnServerThreadAndWait(super::run); - } catch (Exception e) { + } catch (CancellationException ignored) { + + } catch (Exception e) { throw new RuntimeException(e); } }