Skip to content

Commit

Permalink
Suppress server startup attempt when trying to pause a non-responsive…
Browse files Browse the repository at this point in the history
… server
  • Loading branch information
drivenflywheel committed Aug 12, 2024
1 parent dcae255 commit c135f36
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/main/java/emissary/command/ServiceCommand.java
Original file line number Diff line number Diff line change
Expand Up @@ -113,8 +113,13 @@ public void run(CommandLine c) {
throw new EmissaryRuntimeException("Emissary " + getServiceName() + " is already running");
}
} else {
// no running server so fire it up
startService();
if (isPause()) {
// we hadn't intended to start the service, so don't try to do so now
throw new EmissaryRuntimeException("Error pausing service: request returned status " + response.getStatus());
} else {
// no running server so fire it up
startService();
}
}
}
}
Expand Down

0 comments on commit c135f36

Please sign in to comment.