summaryrefslogtreecommitdiffstats
path: root/net/quic/reliable_quic_stream.cc
diff options
context:
space:
mode:
Diffstat (limited to 'net/quic/reliable_quic_stream.cc')
-rw-r--r--net/quic/reliable_quic_stream.cc28
1 files changed, 24 insertions, 4 deletions
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index df2972c..0c063fb 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -174,10 +174,13 @@ void ReliableQuicStream::SetFromConfig() {
void ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) {
DCHECK_EQ(frame.stream_id, id_);
- if (read_side_closed_) {
- DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id;
- // The subclass does not want read data: blackhole the data.
- return;
+ bool flag_value = FLAGS_quic_fix_fin_accounting;
+ if (!flag_value) {
+ if (read_side_closed_) {
+ DVLOG(1) << ENDPOINT << "Ignoring frame " << frame.stream_id;
+ // The subclass does not want to read data: blackhole the data.
+ return;
+ }
}
if (!FLAGS_quic_stop_checking_for_mismatch_ids && frame.stream_id != id_) {
@@ -192,6 +195,14 @@ void ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) {
}
}
+ if (flag_value) {
+ if (read_side_closed_) {
+ DVLOG(1) << ENDPOINT << "Ignoring data in frame " << frame.stream_id;
+ // The subclass does not want to read data: blackhole the data.
+ return;
+ }
+ }
+
// This count includes duplicate data received.
size_t frame_payload_size = frame.data.size();
stream_bytes_read_ += frame_payload_size;
@@ -480,6 +491,15 @@ QuicVersion ReliableQuicStream::version() const {
return session_->connection()->version();
}
+void ReliableQuicStream::StopReading() {
+ if (!FLAGS_quic_implement_stop_reading) {
+ CloseReadSide();
+ return;
+ }
+ DVLOG(1) << ENDPOINT << "Stop reading from stream " << id();
+ sequencer_.StopReading();
+}
+
void ReliableQuicStream::OnClose() {
CloseReadSide();
CloseWriteSide();