http2: improve handling of lost PING in Server · golang/net@09731f9 (original) (raw)
Navigation Menu
- Explore
- Pricing
Provide feedback
Saved searches
Use saved searches to filter your results more quickly
Appearance settings
Commit 09731f9
authored and
committed
http2: improve handling of lost PING in Server
This addresses inconsistencies in handling lost PINGs between Server and Transport by: 1. Always logging a message for lost PINGs, regardless of verbose mode. 2. Invoking CountError with the conn_close_lost_ping error key.Fixes golang/go#69963Change-Id: I58fee489f7896dbb80ccc50265452cd953f7ca6b GitHub-Last-Rev: ef74c95GitHub-Pull-Request: #229Reviewed-on: https://go-review.googlesource.com/c/net/+/635555Auto-Submit: Sean Liao sean@liao.dev LUCI-TryBot-Result: Go LUCI golang-scoped@luci-project-accounts.iam.gserviceaccount.com Reviewed-by: Sean Liao sean@liao.dev Reviewed-by: Damien Neil dneil@google.com Reviewed-by: David Chase drchase@google.com
File tree
1 file changed
lines changed
1 file changed
lines changed
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1068,7 +1068,10 @@ func (sc *serverConn) serve(conf http2Config) { | ||
1068 | 1068 | |
1069 | 1069 | func (sc *serverConn) handlePingTimer(lastFrameReadTime time.Time) { |
1070 | 1070 | if sc.pingSent { |
1071 | -sc.vlogf("timeout waiting for PING response") | |
1071 | +sc.logf("timeout waiting for PING response") | |
1072 | +if f := sc.countErrorFunc; f != nil { | |
1073 | +f("conn_close_lost_ping") | |
1074 | + } | |
1072 | 1075 | sc.conn.Close() |
1073 | 1076 | return |
1074 | 1077 | } |