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

Unified Diff: net/spdy/spdy_session.cc

Issue 328823003: Ensure SpdySession::StartGoingAway is always called with an error. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Test fixes. Created 6 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 | « no previous file | net/spdy/spdy_session_pool.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 0dce82c8ae86087b62899fe8b9d72e44b24ad4f3..4ee40461d1baa0c45ad943412b8e8a1c0ec27a82 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1598,7 +1598,13 @@ void SpdySession::DoDrainSession(Error err, const std::string& description) {
UMA_HISTOGRAM_CUSTOM_COUNTS("Net.SpdySession.BytesRead.OtherErrors",
total_bytes_received_, 1, 100000000, 50);
- StartGoingAway(0, err);
+ if (err == OK) {
+ // We ought to be going away already, as this is a graceful close.
+ DcheckGoingAway();
+ StartGoingAway(0, ERR_ABORTED);
Ryan Hamilton 2014/06/11 17:05:59 Hm. Handling DCHECKS is verboten in Chrome. (There
Johnny 2014/06/11 17:17:20 Removed.
+ } else {
+ StartGoingAway(0, err);
+ }
DcheckDraining();
MaybePostWriteLoop();
}
@@ -1639,6 +1645,7 @@ SpdyStreamId SpdySession::GetNewStreamId() {
void SpdySession::CloseSessionOnError(Error err,
const std::string& description) {
+ DCHECK_LT(err, ERR_IO_PENDING);
DoDrainSession(err, description);
}
« no previous file with comments | « no previous file | net/spdy/spdy_session_pool.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698