Skip to content

Commit

Permalink
[lab-6] revert
Browse files Browse the repository at this point in the history
  • Loading branch information
a.svistukhin committed Apr 25, 2024
1 parent cf369ec commit c57f7af
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/main/java/ru/vk/itmo/test/asvistukhin/ServerImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -165,14 +165,9 @@ private void processFirstRequest(
.toArray(CompletableFuture[]::new)
);

allFutures.whenComplete(
(result, ex) -> futures.forEach(future -> future.completeExceptionally(new TimeoutException()))
);

try {
allFutures.get(5, TimeUnit.SECONDS);
} catch (TimeoutException e) {
futures.forEach(future -> future.completeExceptionally(new TimeoutException()));
log.warn("Timeout reached while waiting for responses");
}

Expand Down

0 comments on commit c57f7af

Please sign in to comment.