From 4c1922448b2dc824dd8a9d610efca2a1aae50ed6 Mon Sep 17 00:00:00 2001 From: WeidiDeng Date: Mon, 28 Apr 2025 17:03:47 +0800 Subject: [PATCH] fix if check --- modules/caddyhttp/http2listener.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/caddyhttp/http2listener.go b/modules/caddyhttp/http2listener.go index c1088395e..b0bcbfe81 100644 --- a/modules/caddyhttp/http2listener.go +++ b/modules/caddyhttp/http2listener.go @@ -40,7 +40,7 @@ func (h *http2Listener) Accept() (net.Conn, error) { // emit a warning if h.useTLS && !isConnectionStater { h.logger.Warn("tls is enabled, but listener wrapper returns a connection that doesn't implement connectionStater") - } else if isConnectionStater { + } else if !h.useTLS && isConnectionStater { h.logger.Warn("tls is disabled, but listener wrapper returns a connection that implements connectionStater") }