Chromium Code Reviews| 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); |
| } |