13
0

Fix failure callback order.
Alle Prüfungen waren erfolgreich
SteamWarCI Build successful

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); started = test.test(line);
} }
if(line == null){ if(line == null)
failureCallback.accept(new IOException(serverName + " did not start correctly!")); throw new IOException(serverName + " did not start correctly!");
started = false;
}
} }
} }
protected void register() { protected void register() {
synchronized (serverList) { synchronized (serverList) {
if(ProxyServer.getInstance().getServers().containsKey(serverName)) { 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); ProxyServer.getInstance().getServers().put(serverName, server);
@ -212,7 +213,7 @@ public class Subserver {
sendProgress(4); sendProgress(4);
else if(line.contains("Preparing start region")) else if(line.contains("Preparing start region"))
sendProgress(6); sendProgress(6);
return line.contains("Done ("); return line.contains("Finished mapping loading");
}); });
} }