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_session.cc b/quic/core/quic_session.cc
index 09e305b..b9cef8d 100644
--- a/quic/core/quic_session.cc
+++ b/quic/core/quic_session.cc
@@ -305,7 +305,10 @@
}
pending->OnRstStreamFrame(frame);
- SendRstStream(stream_id, QUIC_RST_ACKNOWLEDGEMENT, 0);
+ // Pending stream is currently read only. We can safely close the stream.
+ DCHECK_EQ(READ_UNIDIRECTIONAL,
+ QuicUtils::GetStreamType(pending->id(), perspective(),
+ /*peer_initiated = */ true));
ClosePendingStream(stream_id);
}