gfe-relnote: (n/a) In QuicClientBase, mark version negotiated when the client reconnects. Test only.
This is an attempt to deflake test SimpleRequestResponseZeroConnectionID and ZeroConnectionID.
PiperOrigin-RevId: 293356478
Change-Id: I63bbed4fde7a9fe71a1100660c7c82750c0bf74f
diff --git a/quic/core/quic_connection.h b/quic/core/quic_connection.h
index 56d88a3..b932164 100644
--- a/quic/core/quic_connection.h
+++ b/quic/core/quic_connection.h
@@ -484,6 +484,15 @@
return framer_.supported_versions();
}
+ // Mark version negotiated for this connection. Once called, the connection
+ // will ignore received version negotiation packets.
+ void SetVersionNegotiated() {
+ version_negotiated_ = true;
+ if (perspective_ == Perspective::IS_SERVER) {
+ framer_.InferPacketHeaderTypeFromVersion();
+ }
+ }
+
// From QuicFramerVisitorInterface
void OnError(QuicFramer* framer) override;
bool OnProtocolVersionMismatch(ParsedQuicVersion received_version) override;