Skip to content

Commit

Permalink
Bugfix: Incorrect usage of Promise (#3385)
Browse files Browse the repository at this point in the history
  • Loading branch information
CTMBNara authored Aug 27, 2024
1 parent f1065d3 commit 8102f04
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,12 @@ public DaemonVerticle(List<Initializable> initializables, List<ScheduledReporter

@Override
public void start(Promise<Void> startPromise) {
startPromise.handle(all(initializables, initializable -> initializable::initialize));
all(initializables, initializable -> initializable::initialize).onComplete(startPromise);
}

@Override
public void stop(Promise<Void> stopPromise) {
stopPromise.handle(all(closeables, closeable -> closeable::close));
all(closeables, closeable -> closeable::close).onComplete(stopPromise);
}

private static <E> Future<Void> all(Collection<E> entries,
Expand Down

0 comments on commit 8102f04

Please sign in to comment.