Reduce checkpoint exceptions, use "new" Reflection utils in CommandRemover #256
@ -69,8 +69,17 @@ public class CheckpointUtils {
|
||||
try {
|
||||
freezeInternal(path);
|
||||
} catch (Exception e) {
|
||||
String message = e.getMessage() != null ? e.getMessage() : "";
|
||||
if(message.contains("Connected TCP socket")) {
|
||||
Core.getInstance().getLogger().log(Level.INFO, "Connected TCP socket, waiting for checkpointing");
|
||||
Bukkit.getScheduler().runTaskLater(Core.getInstance(), CheckpointUtils::freeze, 1);
|
||||
return;
|
||||
}
|
||||
|
||||
Bukkit.shutdown();
|
||||
throw new SecurityException(e);
|
||||
|
||||
if(message.contains("Can't dump ghost file")) // File/Jar has been updated
|
||||
throw new SecurityException(e);
|
||||
Lixfel markierte diese Unterhaltung als gelöst
|
||||
} finally {
|
||||
// Delete checkpoint
|
||||
try (Stream<Path> stream = Files.walk(path)) {
|
||||
@ -109,8 +118,6 @@ public class CheckpointUtils {
|
||||
try {
|
||||
criu.checkpointJVM();
|
||||
} catch (JVMCRIUException e) {
|
||||
Bukkit.shutdown();
|
||||
|
||||
Path logfile = path.resolve("criu.log");
|
||||
if(logfile.toFile().exists())
|
||||
throw new IllegalStateException("Could not create checkpoint, criu log:\n" + new String(Files.readAllBytes(logfile)), e);
|
||||
|
In neuem Issue referenzieren
Einen Benutzer sperren
Hat das einen Grund, dass du hier dann nicht mehr den Server stoppst?
Stoppe den Server doch 2 Zeilen drüber... Ich werfe halt nur keine Fehlermeldung darüber.
Stimmt habe ich nicht gesehen