| Index: net/quic/chromium/bidirectional_stream_quic_impl.cc
|
| diff --git a/net/quic/chromium/bidirectional_stream_quic_impl.cc b/net/quic/chromium/bidirectional_stream_quic_impl.cc
|
| index 3f25286e67f633a9d1854da01fddf003c89bfcbf..d115e40b9913281d9b36862383f188ee3c6912e4 100644
|
| --- a/net/quic/chromium/bidirectional_stream_quic_impl.cc
|
| +++ b/net/quic/chromium/bidirectional_stream_quic_impl.cc
|
| @@ -42,7 +42,11 @@ BidirectionalStreamQuicImpl::BidirectionalStreamQuicImpl(
|
| }
|
|
|
| BidirectionalStreamQuicImpl::~BidirectionalStreamQuicImpl() {
|
| - Cancel();
|
| + if (stream_) {
|
| + delegate_ = nullptr;
|
| + stream_->Reset(QUIC_STREAM_CANCELLED);
|
| + }
|
| +
|
| if (session_)
|
| session_->RemoveObserver(this);
|
| }
|
| @@ -195,18 +199,6 @@ void BidirectionalStreamQuicImpl::SendvData(
|
| }
|
| }
|
|
|
| -void BidirectionalStreamQuicImpl::Cancel() {
|
| - if (delegate_) {
|
| - delegate_ = nullptr;
|
| - // Cancel any pending callbacks.
|
| - weak_factory_.InvalidateWeakPtrs();
|
| - }
|
| - if (stream_) {
|
| - stream_->Reset(QUIC_STREAM_CANCELLED);
|
| - ResetStream();
|
| - }
|
| -}
|
| -
|
| NextProto BidirectionalStreamQuicImpl::GetProtocol() const {
|
| return negotiated_protocol_;
|
| }
|
|
|