Fix Reset logic in PendingStream.

Pending streams are now only used as read-unidirectional streams. As pointed in https://tools.ietf.org/html/draft-ietf-quic-transport-23#section-19.4, the stream shouldn't send any RESET_STREAM frame.

gfe-relnote: protected by disabled v99 flag.
PiperOrigin-RevId: 276570554
Change-Id: Ie0bd05af05af9d088d491357561fea3015b5503b
diff --git a/quic/core/quic_stream.cc b/quic/core/quic_stream.cc
index aced2b9..360ac30 100644
--- a/quic/core/quic_stream.cc
+++ b/quic/core/quic_stream.cc
@@ -136,9 +136,13 @@
   connection_flow_controller_->AddBytesConsumed(bytes);
 }
 
-void PendingStream::Reset(QuicRstStreamErrorCode error) {
-  // TODO: RESET_STREAM must not be sent for READ_UNIDIRECTIONAL stream.
-  session_->SendRstStream(id_, error, 0);
+void PendingStream::Reset(QuicRstStreamErrorCode /*error*/) {
+  // Currently PendingStream is only read-unidirectional. It shouldn't send
+  // Reset.
+  DCHECK_EQ(READ_UNIDIRECTIONAL,
+            QuicUtils::GetStreamType(id_, session_->perspective(),
+                                     /*peer_initiated = */ true));
+  QUIC_NOTREACHED();
 }
 
 void PendingStream::CloseConnectionWithDetails(QuicErrorCode error,