From cfed57f0c66405b98e43e033e06edbf26c88c216 Mon Sep 17 00:00:00 2001 From: Hubert Grochowski Date: Thu, 12 Dec 2024 13:15:37 +0100 Subject: [PATCH 1/2] http2: always log lost server ping --- http2/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/http2/server.go b/http2/server.go index b55547aec..dd4f249da 100644 --- a/http2/server.go +++ b/http2/server.go @@ -1068,7 +1068,7 @@ func (sc *serverConn) serve(conf http2Config) { func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) { if sc.pingSent { - sc.vlogf("timeout waiting for PING response") + sc.logf("timeout waiting for PING response") sc.conn.Close() return } From ef74c9577a4005018c2303810947d2da4f5b4ca6 Mon Sep 17 00:00:00 2001 From: Hubert Grochowski Date: Thu, 12 Dec 2024 13:16:15 +0100 Subject: [PATCH 2/2] http2: count error on server lost ping This is to unify lost ping handling in server and transport. --- http2/server.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/http2/server.go b/http2/server.go index dd4f249da..f0d0b9f6b 100644 --- a/http2/server.go +++ b/http2/server.go @@ -1069,6 +1069,9 @@ func (sc *serverConn) serve(conf http2Config) { func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) { if sc.pingSent { sc.logf("timeout waiting for PING response") + if f := sc.countErrorFunc; f != nil { + f("conn_close_lost_ping") + } sc.conn.Close() return }