gfe-relnote: deprecate gfe2_reloadable_flag_quic_delete_send_rst_stream_inner PiperOrigin-RevId: 291758426 Change-Id: Ibea1352cbc18d6c7189aa72c02778fd5bc5af4cd
diff --git a/quic/core/quic_session.cc b/quic/core/quic_session.cc index 109a668..b60109a 100644 --- a/quic/core/quic_session.cc +++ b/quic/core/quic_session.cc
@@ -734,11 +734,6 @@ void QuicSession::SendRstStream(QuicStreamId id, QuicRstStreamErrorCode error, QuicStreamOffset bytes_written) { - if (!GetQuicReloadableFlag(quic_delete_send_rst_stream_inner)) { - SendRstStreamInner(id, error, bytes_written, false); - return; - } - QUIC_RELOADABLE_FLAG_COUNT(quic_delete_send_rst_stream_inner); if (connection()->connected()) { QuicConnection::ScopedPacketFlusher flusher(connection()); MaybeSendRstStreamFrame(id, error, bytes_written); @@ -754,42 +749,6 @@ CloseStreamInner(id, true); } -void QuicSession::SendRstStreamInner(QuicStreamId id, - QuicRstStreamErrorCode error, - QuicStreamOffset bytes_written, - bool close_write_side_only) { - if (connection()->connected()) { - // Only send if still connected. - if (VersionHasIetfQuicFrames(transport_version())) { - // Send a RST_STREAM frame plus, if version 99, an IETF - // QUIC STOP_SENDING frame. Both sre sent to emulate - // the two-way close that Google QUIC's RST_STREAM does. - QuicConnection::ScopedPacketFlusher flusher(connection()); - if (QuicUtils::GetStreamType(id, perspective(), IsIncomingStream(id)) != - READ_UNIDIRECTIONAL) { - control_frame_manager_.WriteOrBufferRstStream(id, error, bytes_written); - } - if (!close_write_side_only && - QuicUtils::GetStreamType(id, perspective(), IsIncomingStream(id)) != - WRITE_UNIDIRECTIONAL) { - control_frame_manager_.WriteOrBufferStopSending(error, id); - } - } else { - DCHECK(!close_write_side_only); - control_frame_manager_.WriteOrBufferRstStream(id, error, bytes_written); - } - connection_->OnStreamReset(id, error); - } - if (error != QUIC_STREAM_NO_ERROR && QuicContainsKey(zombie_streams_, id)) { - OnStreamDoneWaitingForAcks(id); - return; - } - - if (!close_write_side_only) { - CloseStreamInner(id, true); - } -} - void QuicSession::MaybeSendRstStreamFrame(QuicStreamId id, QuicRstStreamErrorCode error, QuicStreamOffset bytes_written) {
diff --git a/quic/core/quic_session.h b/quic/core/quic_session.h index d951912..f17eabc 100644 --- a/quic/core/quic_session.h +++ b/quic/core/quic_session.h
@@ -444,17 +444,6 @@ return num_locally_closed_incoming_streams_highest_offset_; } - // Does actual work of sending reset-stream or reset-stream&stop-sending - // If the connection is not version 99/IETF QUIC, will always send a - // RESET_STREAM and close_write_side_only is ignored. If the connection is - // IETF QUIC/Version 99 then will send a RESET_STREAM and STOP_SENDING if - // close_write_side_only is false, just a RESET_STREAM if - // close_write_side_only is true. - virtual void SendRstStreamInner(QuicStreamId id, - QuicRstStreamErrorCode error, - QuicStreamOffset bytes_written, - bool close_write_side_only); - // Record errors when a connection is closed at the server side, should only // be called from server's perspective. // Noop if |error| is QUIC_NO_ERROR.