From ef74c9577a4005018c2303810947d2da4f5b4ca6 Mon Sep 17 00:00:00 2001 From: Hubert Grochowski Date: Thu, 12 Dec 2024 13:16:15 +0100 Subject: [PATCH] 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 }