diff --git a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java index 7ddb3d0f87021..9ea8dffcd4ecd 100644 --- a/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java +++ b/extensions/vertx-http/runtime/src/main/java/io/quarkus/vertx/http/runtime/VertxHttpRecorder.java @@ -1173,22 +1173,23 @@ public void handle(AsyncResult event) { } else { actualHttpPort = actualPort; } - if (remainingCount.decrementAndGet() == 0) { - //make sure we only set the properties once - if (actualPort != options.getPort()) { - // Override quarkus.http(s)?.(test-)?port - String schema; - if (https) { - clearHttpsProperty = true; - schema = "https"; - } else { - clearHttpProperty = true; - actualHttpPort = actualPort; - schema = "http"; - } - portSystemProperties = new PortSystemProperties(); - portSystemProperties.set(schema, actualPort, launchMode); + if (actualPort != options.getPort()) { + // Override quarkus.http(s)?.(test-)?port + String schema; + if (https) { + clearHttpsProperty = true; + schema = "https"; + } else { + clearHttpProperty = true; + actualHttpPort = actualPort; + schema = "http"; } + portSystemProperties = new PortSystemProperties(); + portSystemProperties.set(schema, actualPort, launchMode); + } + + if (remainingCount.decrementAndGet() == 0) { + //make sure we only complete once startFuture.complete(null); }