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

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: Remove extraneous StartGoingAway 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..17c645d8cb7606e755a3b3bed4cd9adcfe100a46 100644
--- a/net/spdy/spdy_session.cc
+++ b/net/spdy/spdy_session.cc
@@ -1598,7 +1598,12 @@ 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();
+ } else {
+ StartGoingAway(0, err);
+ }
DcheckDraining();
MaybePostWriteLoop();
}
@@ -1639,6 +1644,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