1
0

Fix failure callback order.

Dieser Commit ist enthalten in:
Lixfel 2024-01-20 08:59:19 +01:00
Ursprung ac8c277846
Commit 9493b251a6

Datei anzeigen

@ -170,17 +170,18 @@ public class Subserver {
started = test.test(line);
}
if(line == null){
failureCallback.accept(new IOException(serverName + " did not start correctly!"));
started = false;
}
if(line == null)
throw new IOException(serverName + " did not start correctly!");
}
}
protected void register() {
synchronized (serverList) {
if(ProxyServer.getInstance().getServers().containsKey(serverName)) {
throw new SecurityException("Server already registered: " + serverName);
SecurityException e = new SecurityException("Server already registered: " + serverName);
stop();
failureCallback.accept(e);
throw e;
}
ProxyServer.getInstance().getServers().put(serverName, server);
@ -212,7 +213,7 @@ public class Subserver {
sendProgress(4);
else if(line.contains("Preparing start region"))
sendProgress(6);
return line.contains("Done (");
return line.contains("Finished mapping loading");
});
}