Skip to content

Commit

Permalink
DBZ-8414 Always specify await timeout
Browse files Browse the repository at this point in the history
Now the `shutDownLatch` count down should be always called, but as
a safety measute add timeout to `await()` method, which should
always have some reasonable timeout.
  • Loading branch information
vjuranek authored and jpechane committed Nov 20, 2024
1 parent 655ccef commit 572675a
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -336,7 +336,7 @@ private void closeEngineWithException(Throwable exitError) {
*/
private void finishShutDown(Throwable exitError) {
try {
shutDownLatch.await();
shutDownLatch.await(config.getLong(AsyncEngineConfig.TASK_MANAGEMENT_TIMEOUT_MS), TimeUnit.MILLISECONDS);
}
catch (InterruptedException e) {
LOGGER.warn("Interrupted while waiting for shutdown to finish.");
Expand Down

0 comments on commit 572675a

Please sign in to comment.