@Override
        protected void decodeLast(ChannelHandlerContext ctx, ByteBuf in, List<Object> out) throws Exception {
            super.decodeLast(ctx, in, out);
            if (!handledResponse) {
                // If the connection has been closed even without receiving anything useful,
                // it is likely that the server failed to decode the preface string.
                if (httpPreference == HttpPreference.HTTP2_REQUIRED) {
                    finishWithNegotiationFailure(ctx, http2, http1,
                                                 "too little data to determine the HTTP version");
                } else {
                    // We can silently retry with HTTP/1.
                    retryWith(ctx, http1);
                }
            }
        }
A handler that closes an HTTP/2 connection when the server responds with an HTTP/1 response, so that
HTTP/1 is used instead of HTTP/2 on next connection attempt.
core/src/main/java/com/linecorp/armeria/client/HttpClientPipelineConfigurator.java