| Index: net/quic/quartc/quartc_session.cc
|
| diff --git a/net/quic/quartc/quartc_session.cc b/net/quic/quartc/quartc_session.cc
|
| index fb14ffa714f85b46cd6fc033b8b01ad18d94671f..7e5c5af676a460c119411b6db2c0eb845f3d08f0 100644
|
| --- a/net/quic/quartc/quartc_session.cc
|
| +++ b/net/quic/quartc/quartc_session.cc
|
| @@ -174,6 +174,21 @@ void QuartcSession::CloseStream(QuicStreamId stream_id) {
|
| QuicSession::CloseStream(stream_id);
|
| }
|
|
|
| +void QuartcSession::CancelStream(QuicStreamId stream_id) {
|
| + ResetStream(stream_id, QuicRstStreamErrorCode::QUIC_STREAM_CANCELLED);
|
| +}
|
| +
|
| +void QuartcSession::ResetStream(QuicStreamId stream_id,
|
| + QuicRstStreamErrorCode error) {
|
| + if (!IsOpenStream(stream_id)) {
|
| + return;
|
| + }
|
| + QuicStream* stream = QuicSession::GetOrCreateStream(stream_id);
|
| + if (stream) {
|
| + stream->Reset(error);
|
| + }
|
| +}
|
| +
|
| void QuartcSession::OnConnectionClosed(QuicErrorCode error,
|
| const string& error_details,
|
| ConnectionCloseSource source) {
|
| @@ -289,10 +304,15 @@ std::unique_ptr<QuartcStream> QuartcSession::CreateDataStream(
|
| // priority.
|
| write_blocked_streams()->RegisterStream(stream->id(), priority);
|
|
|
| - // Incoming streams need to be registered with the session_delegate_.
|
| if (IsIncomingStream(id)) {
|
| DCHECK(session_delegate_);
|
| + // Incoming streams need to be registered with the session_delegate_.
|
| session_delegate_->OnIncomingStream(stream.get());
|
| + // Quartc doesn't send on incoming streams.
|
| + stream->set_fin_sent(true);
|
| + } else {
|
| + // Quartc doesn't receive on outgoing streams.
|
| + stream->set_fin_received(true);
|
| }
|
| }
|
| return stream;
|
|
|