Archived
0

Zond: перезапустить процесс в случае краша

This commit is contained in:
2017-07-22 20:35:56 +03:00
parent b51601a001
commit 883c4f1257
2 changed files with 6 additions and 2 deletions

View File

@@ -1,5 +1,5 @@
group = 'asys'
version = '0.7.11-SNAPSHOT'
version = '0.7.12-SNAPSHOT'
apply plugin: 'application'

View File

@@ -98,7 +98,8 @@ public class ZondCommandHandler implements CommandHandler {
killProcess();
});
code = executor.execute(commandLine);
} catch (ExecuteException ignore) {
} catch (ExecuteException e) {
code = e.getExitValue();
} catch (IOException e) {
Shell.getInstance().getOutput().println("Exception message: " + e.getMessage());
code = -99;
@@ -119,6 +120,9 @@ public class ZondCommandHandler implements CommandHandler {
} else if (flagForceRestartProcess) {
_try = 0;
flagForceRestartProcess = false;
} else if (code != 0 && code != -99) {
Shell.getInstance().getOutput().println("[!] Try start process again...");
_try = 0;
} else {
break;
}