Zond:fix: слишком частые рестары при старте сервера
This commit is contained in:
@@ -102,13 +102,13 @@ public class ZondCommandHandler implements CommandHandler {
|
||||
server.setPingMonitor(pingMonitor);
|
||||
server.start(Config.getInstance().getInt("bridge.port"));
|
||||
|
||||
deadTime = (System.currentTimeMillis()/1000) + (delay*1000);
|
||||
pingMonitor.start(() -> {
|
||||
Shell.getInstance().getOutput().println("[!] Process - zobie?");
|
||||
Shell.getInstance().getOutput().println("[!] Force shutdown process.");
|
||||
flagForceRestartProcess = true;
|
||||
killProcess();
|
||||
});
|
||||
deadTime = (System.currentTimeMillis()/1000) + (delay*1000);
|
||||
code = executor.execute(commandLine);
|
||||
} catch (ExecuteException e) {
|
||||
code = e.getExitValue();
|
||||
@@ -128,7 +128,7 @@ public class ZondCommandHandler implements CommandHandler {
|
||||
_try = 0;
|
||||
break;
|
||||
} else {
|
||||
if (currTime <= deadTime && !flagManualKill && !flagForceRestartProcess) {
|
||||
if (currTime <= deadTime && !flagManualKill) {
|
||||
Shell.getInstance().getOutput().println("[!] Premature end process.");
|
||||
_try++;
|
||||
if (_try < 2) {
|
||||
|
||||
Reference in New Issue
Block a user