Index: net/quic/quic_http_stream.cc |
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc |
index 36eac6aee8ae1fffbf1c5d122c10ceae7c5ea891..664154abe189e156a0bd8fd80edcd5e39bfeaa93 100644 |
--- a/net/quic/quic_http_stream.cc |
+++ b/net/quic/quic_http_stream.cc |
@@ -102,12 +102,15 @@ void QuicHttpStream::OnStreamReady(int rv) { |
int QuicHttpStream::SendRequest(const HttpRequestHeaders& request_headers, |
HttpResponseInfo* response, |
const CompletionCallback& callback) { |
- CHECK(stream_); |
CHECK(!request_body_stream_); |
CHECK(!response_info_); |
CHECK(!callback.is_null()); |
CHECK(response); |
+ if (!stream_) { |
+ return ERR_CONNECTION_CLOSED; |
+ } |
+ |
QuicPriority priority = ConvertRequestPriorityToQuicPriority(priority_); |
stream_->set_priority(priority); |
// Store the serialized request headers. |
@@ -352,6 +355,7 @@ void QuicHttpStream::OnCryptoHandshakeConfirmed() { |
} |
void QuicHttpStream::OnSessionClosed(int error) { |
+ Close(false); |
session_error_ = error; |
session_.reset(); |
} |