When Vert.x is closed return a context less future

This commit is contained in:
Julien Viet
2020-02-13 16:33:48 +01:00
parent d1b48e6557
commit 5718be7f46

View File

@@ -652,7 +652,8 @@ public class VertxImpl implements VertxInternal, MetricsProvider {
closed = this.closed;
}
if (closed) {
return getOrCreateContext().failedFuture("Vert.x closed");
// If we are closed use a context less future
return Future.failedFuture("Vert.x closed");
} else {
return deploymentManager.deployVerticle(verticleSupplier, options);
}