Use maximum stream ID in GOAWAY frame for graceful shutdown.
We are aware of HTTP/2 clients that fail outstanding requests upon GOAWAY
instead of retrying them, and because of this we send max stream ID instead of
largest processed stream ID in HTTP/2. In case a similar issue exists or will
develop for QUIC, the only time a GOAWAY frame with a stream ID less than the
maximum possible stream ID is sent should be right before closing the
connection. This also allows us not to implement resetting incoming streams
with stream ID larger than sent in a GOAWAY frame.
Protected by FLAGS_quic_reloadable_flag_quic_goaway_with_max_stream_id.
PiperOrigin-RevId: 341835202
Change-Id: I8a45511d2d8f617de32ba3b5e55eb93bce26e75b
diff --git a/quic/core/quic_utils.h b/quic/core/quic_utils.h
index c6f5ca0..c1a19a8 100644
--- a/quic/core/quic_utils.h
+++ b/quic/core/quic_utils.h
@@ -170,6 +170,10 @@
QuicTransportVersion version,
Perspective perspective);
+ // Returns the largest possible client initiated bidirectional stream ID.
+ static QuicStreamId GetMaxClientInitiatedBidirectionalStreamId(
+ QuicTransportVersion version);
+
// Generates a connection ID of length |expected_connection_id_length|
// derived from |connection_id|.
// This is guaranteed to be deterministic (calling this method with two