Reduce checkpoint exceptions by TCP retry and silent jar updates
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful
Dieser Commit ist enthalten in:
Ursprung
375fbf1463
Commit
da01fbb447
@ -69,7 +69,16 @@ 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();
|
||||
|
||||
if(message.contains("Can't dump ghost file")) // File/Jar has been updated
|
||||
throw new SecurityException(e);
|
||||
} finally {
|
||||
// Delete checkpoint
|
||||
@ -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