| Index: net/quic/quic_packet_creator.cc
|
| diff --git a/net/quic/quic_packet_creator.cc b/net/quic/quic_packet_creator.cc
|
| index 312a738dd311c8e8d32e53c925af6fab8290cf6c..5d40e23dda0ae5d635c9fc25efa97873e22ace87 100644
|
| --- a/net/quic/quic_packet_creator.cc
|
| +++ b/net/quic/quic_packet_creator.cc
|
| @@ -91,7 +91,7 @@ QuicPacketCreator::QuicPacketCreator(QuicConnectionId connection_id,
|
| framer_(framer),
|
| random_bool_source_(new QuicRandomBoolSource(random_generator)),
|
| packet_number_(0),
|
| - should_fec_protect_(false),
|
| + should_fec_protect_next_packet_(false),
|
| fec_protect_(false),
|
| send_version_in_packet_(framer->perspective() == Perspective::IS_CLIENT),
|
| max_packet_length_(0),
|
| @@ -251,15 +251,19 @@ bool QuicPacketCreator::ConsumeData(QuicStreamId id,
|
| QuicStreamOffset offset,
|
| bool fin,
|
| bool needs_padding,
|
| - QuicFrame* frame) {
|
| + QuicFrame* frame,
|
| + FecProtection fec_protection) {
|
| if (!HasRoomForStreamFrame(id, offset)) {
|
| Flush();
|
| return false;
|
| }
|
|
|
| UniqueStreamBuffer buffer;
|
| + if (fec_protection == MUST_FEC_PROTECT) {
|
| + should_fec_protect_next_packet_ = true;
|
| + MaybeStartFecProtection();
|
| + }
|
| CreateStreamFrame(id, iov, iov_offset, offset, fin, frame);
|
| -
|
| bool success = AddFrame(*frame,
|
| /*save_retransmittable_frames=*/true, needs_padding,
|
| std::move(buffer));
|
| @@ -762,7 +766,7 @@ void QuicPacketCreator::MaybeSendFecPacketAndCloseGroup(bool force_send_fec,
|
| }
|
| }
|
|
|
| - if (!should_fec_protect_ && fec_protect_ && !IsFecGroupOpen()) {
|
| + if (!should_fec_protect_next_packet_ && fec_protect_ && !IsFecGroupOpen()) {
|
| StopFecProtectingPackets();
|
| }
|
| }
|
|
|