gfe-relnote: In QUIC with TLS, do not proceed in SetWriteSecret if connection has been closed. Protected by gfe2_reloadable_flag_quic_notify_handshaker_on_connection_close.

PiperOrigin-RevId: 309753183
Change-Id: I829b92d82ca84f85ab60aa09940a3b205641a34b
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index 99d1ff4..29dfb93 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -398,6 +398,11 @@
     on_closed_frame_ = frame;
   }
 
+  if (GetQuicReloadableFlag(quic_notify_handshaker_on_connection_close)) {
+    QUIC_RELOADABLE_FLAG_COUNT(quic_notify_handshaker_on_connection_close);
+    GetMutableCryptoStream()->OnConnectionClosed(frame.quic_error_code, source);
+  }
+
   // Copy all non static streams in a new map for the ease of deleting.
   QuicSmallMap<QuicStreamId, QuicStream*, 10> non_static_streams;
   for (const auto& it : stream_map_) {