do {
retry = false;
cmd = mLocalCommandFactory.create(collector, commandText);
if(mShutdown) {
mLogger.warn("Shutting down command " + command);
cmd.kill();
command.setExitCode(Constants.EXIT_CODE_UNKNOWN);
return;
}
if(attempts++ <= 3 && cmd.getExitCode() == Constants.EXIT_CODE_UNKNOWN) {
mLogger.warn("Command exited with " + cmd.getExitCode() + ", will retry: " + command);