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

Unified Diff: net/quic/quic_session.cc

Issue 139103002: Break out of the loop in QuicSession::OnCanWrite if the QuicConnection (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 11 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/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 e9a9173a01677860393b9562278bd0a960b4f94d..9be3a3bdd478c7bd8775575a6f46a0dcd5343501 100644
--- a/net/quic/quic_session.cc
+++ b/net/quic/quic_session.cc
@@ -273,8 +273,7 @@ bool QuicSession::OnCanWrite() {
// may be modifying the list as we loop.
int remaining_writes = write_blocked_streams_.NumBlockedStreams();
- while (!connection_->HasQueuedData() &&
- remaining_writes > 0) {
+ while (remaining_writes > 0 && connection_->CanWriteStreamData()) {
DCHECK(write_blocked_streams_.HasWriteBlockedStreams());
if (!write_blocked_streams_.HasWriteBlockedStreams()) {
LOG(DFATAL) << "WriteBlockedStream is missing";
@@ -613,7 +612,7 @@ void QuicSession::MarkWriteBlocked(QuicStreamId id, QuicPriority priority) {
write_blocked_streams_.PushBack(id, priority, connection()->version());
}
-bool QuicSession::HasQueuedData() const {
+bool QuicSession::HasDataToWrite() const {
return write_blocked_streams_.HasWriteBlockedStreams() ||
connection_->HasQueuedData();
}
« 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