Index: net/quic/quic_connection.cc |
diff --git a/net/quic/quic_connection.cc b/net/quic/quic_connection.cc |
index 25cc949158a584dc9f6d80fbf0b040c7c66eb53f..a59eaa23ea6498fe5d08a2af1475754fa1cbeaae 100644 |
--- a/net/quic/quic_connection.cc |
+++ b/net/quic/quic_connection.cc |
@@ -1188,8 +1188,8 @@ void QuicConnection::SendRstStream(QuicStreamId id, |
QueuedPacketList::iterator packet_iterator = queued_packets_.begin(); |
while (packet_iterator != queued_packets_.end()) { |
QuicFrames* retransmittable_frames = |
- packet_iterator->retransmittable_frames; |
- if (retransmittable_frames == nullptr) { |
+ &packet_iterator->retransmittable_frames; |
+ if (retransmittable_frames->empty()) { |
++packet_iterator; |
continue; |
} |
@@ -1825,6 +1825,7 @@ void QuicConnection::SendOrQueuePacket(SerializedPacket* packet) { |
packet->packet = packet->packet->Clone(); |
} |
queued_packets_.push_back(*packet); |
+ packet->retransmittable_frames.clear(); |
} |
// If a forward-secure encrypter is available but is not being used and the |
@@ -2359,7 +2360,7 @@ HasRetransmittableData QuicConnection::IsRetransmittable( |
// Retransmitted packets retransmittable frames are owned by the unacked |
// packet map, but are not present in the serialized packet. |
if (packet.transmission_type != NOT_RETRANSMISSION || |
- packet.retransmittable_frames != nullptr) { |
+ !packet.retransmittable_frames.empty()) { |
return HAS_RETRANSMITTABLE_DATA; |
} else { |
return NO_RETRANSMITTABLE_DATA; |
@@ -2367,10 +2368,10 @@ HasRetransmittableData QuicConnection::IsRetransmittable( |
} |
bool QuicConnection::IsTerminationPacket(const SerializedPacket& packet) { |
- if (packet.retransmittable_frames == nullptr) { |
+ if (packet.retransmittable_frames.empty()) { |
return false; |
} |
- for (const QuicFrame& frame : *packet.retransmittable_frames) { |
+ for (const QuicFrame& frame : packet.retransmittable_frames) { |
if (frame.type == CONNECTION_CLOSE_FRAME) { |
return true; |
} |