diff --git a/webserver/webserver/src/main/java/io/helidon/webserver/ConnectionHandler.java b/webserver/webserver/src/main/java/io/helidon/webserver/ConnectionHandler.java index c4bb7ab11b0..673b2861b42 100644 --- a/webserver/webserver/src/main/java/io/helidon/webserver/ConnectionHandler.java +++ b/webserver/webserver/src/main/java/io/helidon/webserver/ConnectionHandler.java @@ -227,6 +227,11 @@ public Router router() { } private ServerConnection identifyConnection() { + // if just one candidate, take a chance with it + if (providerCandidates.size() == 1) { + return providerCandidates.getFirst().connection(this); + } + try { reader.ensureAvailable(); } catch (DataReader.InsufficientDataAvailableException e) {