⚡️ fix: Fixed the Promise completion logic in the stop method.
This commit is contained in:
parent
9db72eeb32
commit
49af0b2f2d
2 changed files with 2 additions and 1 deletions
|
|
@ -82,12 +82,12 @@ public class DataVerticle extends AbstractVerticle {
|
|||
public void stop(Promise<Void> stopPromise) throws Exception {
|
||||
if (pool != null) {
|
||||
pool.close().onComplete(r -> {
|
||||
stopPromise.complete();
|
||||
if (r.succeeded()) {
|
||||
log.debug("Data verticle stopped!");
|
||||
} else {
|
||||
log.error("Failed to close data verticle: %s".formatted(r.cause().getMessage()));
|
||||
}
|
||||
stopPromise.complete();
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ public class Start {
|
|||
return;
|
||||
}
|
||||
vertx.undeploy(httpVerticle.deploymentID())
|
||||
.compose(r -> vertx.undeploy(dataVerticle.deploymentID()))
|
||||
.onComplete(res -> {
|
||||
if (res.succeeded()) {
|
||||
log.info("👋 Shutdown success");
|
||||
|
|
|
|||
Loading…
Reference in a new issue