Skip to content

Commit

Permalink
use thenCompose and return future result
Browse files Browse the repository at this point in the history
Signed-off-by: Gabriel Fukushima <[email protected]>
  • Loading branch information
gfukushima committed Jan 29, 2025
1 parent 28ca020 commit 894c62d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ protected SafeFuture<?> doStop() {
Collections.reverse(services);
final Service storageService = services.removeFirst();
return SafeFuture.allOf(services.stream().map(Service::stop).toArray(SafeFuture[]::new))
.thenRun(storageService::stop);
.thenCompose(__ -> SafeFuture.fromRunnable(storageService::stop));
}

@Override
Expand Down

0 comments on commit 894c62d

Please sign in to comment.