forked from SteamWar/SteamWar
Refine checkpoint handling in Subserver and remove unnecessary debug logs in CheckpointUtilsJ9
This commit is contained in:
@@ -121,7 +121,6 @@ class CheckpointUtilsJ9 {
|
|||||||
} catch (JVMCRIUException e) {
|
} catch (JVMCRIUException e) {
|
||||||
Path logfile = path.resolve("criu.log");
|
Path logfile = path.resolve("criu.log");
|
||||||
if(logfile.toFile().exists()) {
|
if(logfile.toFile().exists()) {
|
||||||
System.out.println("Reading criu log");
|
|
||||||
throw new IllegalStateException("Could not create checkpoint, criu log:\n" + new String(Files.readAllBytes(logfile)), e);
|
throw new IllegalStateException("Could not create checkpoint, criu log:\n" + new String(Files.readAllBytes(logfile)), e);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -134,8 +133,6 @@ class CheckpointUtilsJ9 {
|
|||||||
port = stream.readInt();
|
port = stream.readInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println(port);
|
|
||||||
|
|
||||||
// Reopen socket
|
// Reopen socket
|
||||||
bind.invoke(serverConnection, InetAddress.getLoopbackAddress(), port);
|
bind.invoke(serverConnection, InetAddress.getLoopbackAddress(), port);
|
||||||
if(Core.getVersion() > 12) {
|
if(Core.getVersion() > 12) {
|
||||||
|
|||||||
@@ -220,6 +220,7 @@ public class Subserver {
|
|||||||
try {
|
try {
|
||||||
if (checkpoint) {
|
if (checkpoint) {
|
||||||
start(process.getErrorStream(), line -> line.contains("Restore finished successfully."));
|
start(process.getErrorStream(), line -> line.contains("Restore finished successfully."));
|
||||||
|
Thread.sleep(300);
|
||||||
} else {
|
} else {
|
||||||
start(process.getInputStream(), line -> {
|
start(process.getInputStream(), line -> {
|
||||||
if (line.contains("Loading libraries, please wait"))
|
if (line.contains("Loading libraries, please wait"))
|
||||||
|
|||||||
Reference in New Issue
Block a user