Skip to content

Commit

Permalink
http2: count error on server lost ping
Browse files Browse the repository at this point in the history
This is to unify lost ping handling in server and transport.
  • Loading branch information
Choraden committed Dec 12, 2024
1 parent cfed57f commit ef74c95
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions http2/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ef74c95

Please sign in to comment.