Avoid performing pending stream actions after the connection is closed.

gfe-relnote: v99 only, not in prod.
PiperOrigin-RevId: 254805203
Change-Id: I6b7dbc36097d5e8c95a03c3f58a1ef0e32452316
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc
index 0671b8e..5c5d9a6 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -174,6 +174,9 @@
   }
 
   pending->OnStreamFrame(frame);
+  if (!connection()->connected()) {
+    return;
+  }
   if (ProcessPendingStream(pending)) {
     // The pending stream should now be in the scope of normal streams.
     DCHECK(IsClosedStream(stream_id) || IsOpenStream(stream_id))