fix if check

This commit is contained in:
WeidiDeng 2025-04-28 17:03:47 +08:00
parent 337fc17423
commit 4c1922448b
No known key found for this signature in database
GPG Key ID: 25F87CE1741EC7CD

View File

@ -40,7 +40,7 @@ func (h *http2Listener) Accept() (net.Conn, error) {
// emit a warning // emit a warning
if h.useTLS && !isConnectionStater { if h.useTLS && !isConnectionStater {
h.logger.Warn("tls is enabled, but listener wrapper returns a connection that doesn't implement connectionStater") 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") h.logger.Warn("tls is disabled, but listener wrapper returns a connection that implements connectionStater")
} }