gfe-relnote: Do not send connection close when client receives a version negotiation packet. Not affect prod, not protected.
PiperOrigin-RevId: 274017599
Change-Id: Ifddd78e1f9efaa655cb401a404bd634c88d26847
diff --git a/quic/core/quic_connection.cc b/quic/core/quic_connection.cc
index 7d29b86..6ebc20b 100644
--- a/quic/core/quic_connection.cc
+++ b/quic/core/quic_connection.cc
@@ -629,7 +629,7 @@
ParsedQuicVersionVectorToString(framer_.supported_versions()),
"}, peer supported versions: {",
ParsedQuicVersionVectorToString(packet.versions), "}"),
- ConnectionCloseBehavior::SEND_CONNECTION_CLOSE_PACKET);
+ ConnectionCloseBehavior::SILENT_CLOSE);
}
// Handles retry for client connection.
diff --git a/quic/core/quic_connection_test.cc b/quic/core/quic_connection_test.cc
index 68ba446..97119e8 100644
--- a/quic/core/quic_connection_test.cc
+++ b/quic/core/quic_connection_test.cc
@@ -7016,6 +7016,8 @@
ConstructReceivedPacket(*encrypted, QuicTime::Zero()));
EXPECT_CALL(visitor_, OnConnectionClosed(_, ConnectionCloseSource::FROM_SELF))
.WillOnce(Invoke(this, &QuicConnectionTest::SaveConnectionCloseFrame));
+ // Verify no connection close packet gets sent.
+ EXPECT_CALL(*send_algorithm_, OnPacketSent(_, _, _, _, _)).Times(0);
connection_.ProcessUdpPacket(kSelfAddress, kPeerAddress, *received);
EXPECT_FALSE(connection_.connected());
EXPECT_EQ(1, connection_close_frame_count_);