Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(82)

Unified Diff: net/quic/reliable_quic_stream.cc

Issue 17302002: Land Recent QUIC changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/reliable_quic_stream.cc
diff --git a/net/quic/reliable_quic_stream.cc b/net/quic/reliable_quic_stream.cc
index 24bacf19d7aa835819aee4bb915ab282ec4c8565..8f4b9c57e1703a613c50cb5cc5dc592474319a00 100644
--- a/net/quic/reliable_quic_stream.cc
+++ b/net/quic/reliable_quic_stream.cc
@@ -58,7 +58,7 @@ bool ReliableQuicStream::OnStreamFrame(const QuicStreamFrame& frame) {
bool accepted = sequencer_.OnStreamFrame(frame);
if (frame.fin) {
- sequencer_.CloseStreamAtOffset(frame.offset + frame.data.size(), true);
+ sequencer_.CloseStreamAtOffset(frame.offset + frame.data.size());
}
return accepted;
@@ -70,7 +70,7 @@ void ReliableQuicStream::OnStreamReset(QuicRstStreamErrorCode error) {
}
void ReliableQuicStream::ConnectionClose(QuicErrorCode error, bool from_peer) {
- if (IsClosed()) {
+ if (read_side_closed_ && write_side_closed_) {
return;
}
if (error != QUIC_NO_ERROR) {
@@ -143,10 +143,6 @@ bool ReliableQuicStream::IsHalfClosed() const {
return sequencer_.IsHalfClosed();
}
-bool ReliableQuicStream::IsClosed() const {
- return write_side_closed_ && (read_side_closed_ || IsHalfClosed());
-}
-
bool ReliableQuicStream::HasBytesToRead() const {
return !decompressed_headers_.empty() || sequencer_.HasBytesToRead();
}
@@ -364,10 +360,10 @@ void ReliableQuicStream::OnDecompressorAvailable() {
// Either the headers are complete, or the all data as been consumed.
sequencer_.MarkConsumed(total_bytes_consumed);
-
ProcessHeaderData(); // Unprocessed headers remain in decompressed_headers_.
-
- if (headers_decompressed_ && decompressed_headers_.empty()) {
+ if (IsHalfClosed()) {
+ TerminateFromPeer(true);
+ } else if (headers_decompressed_ && decompressed_headers_.empty()) {
sequencer_.FlushBufferedFrames();
}
}
« no previous file with comments | « net/quic/reliable_quic_stream.h ('k') | net/quic/test_tools/crypto_test_utils.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698