Index: net/quic/quic_http_stream.cc |
diff --git a/net/quic/quic_http_stream.cc b/net/quic/quic_http_stream.cc |
index 20d1e365e761de486c627d40cc51baafcd9c4bf0..81b57f8f42827b4514489906ba18b2aaa26844f6 100644 |
--- a/net/quic/quic_http_stream.cc |
+++ b/net/quic/quic_http_stream.cc |
@@ -471,6 +471,10 @@ int QuicHttpStream::DoReadRequestBodyComplete(int rv) { |
if (rv < 0) |
return rv; |
+ // If the stream is already closed, don't continue. |
+ if (!stream_) |
+ return response_status_; |
+ |
request_body_buf_ = new DrainableIOBuffer(raw_request_body_buf_.get(), rv); |
if (rv == 0) { // Reached the end. |
DCHECK(request_body_stream_->IsEOF()); |
@@ -504,6 +508,10 @@ int QuicHttpStream::DoSendBodyComplete(int rv) { |
if (rv < 0) |
return rv; |
+ // If the stream is already closed, don't continue. |
+ if (!stream_) |
+ return response_status_; |
+ |
request_body_buf_->DidConsume(request_body_buf_->BytesRemaining()); |
if (!request_body_stream_->IsEOF()) { |