Skip to content

Commit

Permalink
Update KSML Runner to properly shut down executor service. Caused KSM…
Browse files Browse the repository at this point in the history
…L Java process to keep running (#88)
  • Loading branch information
richard-axual authored Jan 10, 2024
1 parent 4bd3849 commit d382bcd
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -127,6 +127,8 @@ private static void run(Backend backend) {
backendFuture.get();
// Future, check exit state of backend
} catch (ExecutionException | InterruptedException e) {
throw FatalError.reportAndExit(new KSMLExecutionException("Exception caught", e));
}finally {
executorService.shutdown();
try {
if (!executorService.awaitTermination(800, TimeUnit.MILLISECONDS)) {
Expand All @@ -136,7 +138,7 @@ private static void run(Backend backend) {
executorService.shutdownNow();
throw FatalError.reportAndExit(new KSMLExecutionException("Exception caught", e2));
}
throw FatalError.reportAndExit(new KSMLExecutionException("Exception caught", e));

}
}
}

0 comments on commit d382bcd

Please sign in to comment.