Skip to content

Commit

Permalink
If the process is not null and the process has died, don't continue c…
Browse files Browse the repository at this point in the history
…hecking if the server is active.

Signed-off-by: James R. Perkins <[email protected]>
  • Loading branch information
jamezp committed Nov 19, 2024
1 parent a3328f2 commit 6889979
Showing 1 changed file with 5 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,11 @@ public CompletableFuture<ServerManager> build() {
// Wait until the server is running, then determine what type we need to return
while (!isRunning(client)) {
Thread.onSpinWait();
if (process != null && !process.isAlive()) {
throw new ServerManagerException(
"The server process has died. See previous output from the process. Process id "
+ process.pid());
}
}
final String launchType = launchType(client).orElseThrow(() -> new ServerManagerException(
"Could not determine the type of the server. Verify the server is running."));
Expand Down

0 comments on commit 6889979

Please sign in to comment.