Skip to content

Commit

Permalink
fix for timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
srrangarajan committed Sep 7, 2022
1 parent 14b50a6 commit 6704c9a
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -285,6 +285,10 @@ private static<T> CompletableFuture<Void> getNext(CompletableFuture<T> future,
scheduledTimeout =
LazySharedExecutor.executor.schedule(
() -> {
next.complete(null);
if (future.isDone()) {
return;
}
if(log.isDebugEnabled()) log.debug("Throwing timeout exception after {} {} with timeout slot {}", timeout, unit, timeoutSlots);
future.completeExceptionally(new TimeoutException("Timeout after " + timeout));
},
Expand Down

0 comments on commit 6704c9a

Please sign in to comment.