You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The comment above it explains why: nghttp2's automatic ACK in nghttp2_session_on_ping_received is withheld from a closing session, which is
the state a gRPC shutdown sequence reaches, and the peer then waits out its own
timeout (nghttp2 #1103).
What the comment does not say is that nghttp2's automatic ACK is still on, so on
every other connection both fire.
Measurement
One PING sent, ACKs counted off the wire on 52dbeb6:
session
PING ACKs
live, one request in flight
2
peer sent GOAWAY, no stream open
2
The frame sequence for the live case is SETTINGS, SETTINGS ACK, PING ACK, PING ACK, WINDOW_UPDATE, HEADERS, DATA.
A client measuring round-trip time from its PING retires the exchange on the
first ACK and sees the second as an ACK for a PING it never sent.
Fix
nghttp2_option_set_no_auto_ping_ack(opt, 1) in apply_hardened_options, beside
the no_auto_window_update the session already sets, so the ACK the peer gets is
the one the server submits — in both states.
Fixed in bf7e86b: apply_hardened_options sets nghttp2_option_set_no_auto_ping_ack(opt, 1) (src/http2/http2_session.c:1237), so the only ACK on the wire is the one cb_on_frame_recv submits. Evidence: tests/phpt/server/h2/058-h2-ping-ack-once.phpt counts the ACKs off the wire on a live session and on one the peer has GOAWAYed.
Activity
fix(h2): answer a peer PING once, and keep one drain cursor per sessi…
EdmondDantes commentedon Aug 23, 2026
Fixed in bf7e86b:
apply_hardened_optionssetsnghttp2_option_set_no_auto_ping_ack(opt, 1)(src/http2/http2_session.c:1237), so the only ACK on the wire is the onecb_on_frame_recvsubmits. Evidence:tests/phpt/server/h2/058-h2-ping-ack-once.phptcounts the ACKs off the wire on a live session and on one the peer has GOAWAYed.