From 71b94e8de6c123ffa555d2d59fa817d946fff297 Mon Sep 17 00:00:00 2001 From: Julien Viet Date: Wed, 7 Dec 2022 08:20:51 +0100 Subject: [PATCH] Start handshake timeout only if the timeout is > 0 --- src/main/java/io/vertx/core/net/impl/VertxSniHandler.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/io/vertx/core/net/impl/VertxSniHandler.java b/src/main/java/io/vertx/core/net/impl/VertxSniHandler.java index ab80ffd1ac1..2b4496690f9 100644 --- a/src/main/java/io/vertx/core/net/impl/VertxSniHandler.java +++ b/src/main/java/io/vertx/core/net/impl/VertxSniHandler.java @@ -40,7 +40,7 @@ public VertxSniHandler(Mapping mapping, lo @Override public void handlerAdded(ChannelHandlerContext ctx) throws Exception { - if (handshakeTimeoutMillis >= 0) { + if (handshakeTimeoutMillis > 0) { // We assume to always be added in an active channel assert(ctx.channel().isActive()); timeoutFuture = ctx.executor().schedule(() -> {