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

Unified Diff: net/spdy/spdy_session.cc

Issue 1345453005: Do not drop data on the floor in SpdySession::DoReadLoop. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix. Created 5 years, 3 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 | « no previous file | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/spdy/spdy_session.cc
diff --git a/net/spdy/spdy_session.cc b/net/spdy/spdy_session.cc
index 02336399f4e2eb577f2bca8b35a9c283d0252af6..51c5714cf51910430afed74e03e40e19707077f7 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1398,9 +1398,9 @@ int SpdySession::DoReadLoop(ReadState expected_read_state, int result) {
if (result == ERR_IO_PENDING)
break;
- if (bytes_read_without_yielding > kYieldAfterBytesRead ||
- time_func_() > yield_after_time) {
- read_state_ = READ_STATE_DO_READ;
+ if (read_state_ == READ_STATE_DO_READ &&
+ (bytes_read_without_yielding > kYieldAfterBytesRead ||
+ time_func_() > yield_after_time)) {
base::ThreadTaskRunnerHandle::Get()->PostTask(
FROM_HERE,
base::Bind(&SpdySession::PumpReadLoop, weak_factory_.GetWeakPtr(),
« no previous file with comments | « no previous file | net/spdy/spdy_session_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698