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

Unified Diff: net/quic/quic_session.cc

Issue 76723002: Land Recent QUIC Changes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix compilation error Created 7 years, 1 month 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/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/quic_session.cc
diff --git a/net/quic/quic_session.cc b/net/quic/quic_session.cc
index 264d6f53e697502a9d91f8e704d7e98038f68aa6..f968b69a7947bb3e57c3344b5761cbffd6a9091f 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -179,6 +179,10 @@ void QuicSession::OnRstStream(const QuicRstStreamFrame& frame) {
AddPrematurelyClosedStream(frame.stream_id);
return;
}
+ if (stream->stream_bytes_read() > 0 && !stream->headers_decompressed()) {
+ connection()->SendConnectionClose(
+ QUIC_STREAM_RST_BEFORE_HEADERS_DECOMPRESSED);
+ }
stream->OnStreamReset(frame.error_code);
}
@@ -214,12 +218,12 @@ bool QuicSession::OnCanWrite() {
while (!connection_->HasQueuedData() &&
remaining_writes > 0) {
DCHECK(write_blocked_streams_.HasWriteBlockedStreams());
- int index = write_blocked_streams_.GetHighestPriorityWriteBlockedList();
- if (index == -1) {
+ if (!write_blocked_streams_.HasWriteBlockedStreams()) {
LOG(DFATAL) << "WriteBlockedStream is missing";
connection_->CloseConnection(QUIC_INTERNAL_ERROR, false);
return true; // We have no write blocked streams.
}
+ int index = write_blocked_streams_.GetHighestPriorityWriteBlockedList();
QuicStreamId stream_id = write_blocked_streams_.PopFront(index);
if (stream_id == kCryptoStreamId) {
has_pending_handshake_ = false; // We just popped it.
@@ -240,14 +244,17 @@ bool QuicSession::HasPendingHandshake() const {
return has_pending_handshake_;
}
-QuicConsumedData QuicSession::WritevData(QuicStreamId id,
- const struct iovec* iov,
- int iov_count,
- QuicStreamOffset offset,
- bool fin) {
+QuicConsumedData QuicSession::WritevData(
+ QuicStreamId id,
+ const struct iovec* iov,
+ int iov_count,
+ QuicStreamOffset offset,
+ bool fin,
+ QuicAckNotifier::DelegateInterface* ack_notifier_delegate) {
IOVector data;
data.AppendIovec(iov, iov_count);
- return connection_->SendStreamData(id, data, offset, fin, NULL);
+ return connection_->SendStreamData(id, data, offset, fin,
+ ack_notifier_delegate);
}
void QuicSession::SendRstStream(QuicStreamId id,
« no previous file with comments | « net/quic/quic_session.h ('k') | net/quic/quic_session_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698