Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(279)

Side by Side Diff: net/quic/quic_connection.cc

Issue 270213002: Fix a bug where if a crypto packet is spuriously retransmitted and then (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Sending for review Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "net/quic/quic_connection.h" 5 #include "net/quic/quic_connection.h"
6 6
7 #include <string.h> 7 #include <string.h>
8 #include <sys/types.h> 8 #include <sys/types.h>
9 #include <algorithm> 9 #include <algorithm>
10 #include <iterator> 10 #include <iterator>
(...skipping 1250 matching lines...) Expand 10 before | Expand all | Expand 10 after
1261 } 1261 }
1262 } 1262 }
1263 1263
1264 void QuicConnection::RetransmitUnackedPackets( 1264 void QuicConnection::RetransmitUnackedPackets(
1265 RetransmissionType retransmission_type) { 1265 RetransmissionType retransmission_type) {
1266 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type); 1266 sent_packet_manager_.RetransmitUnackedPackets(retransmission_type);
1267 1267
1268 WriteIfNotBlocked(); 1268 WriteIfNotBlocked();
1269 } 1269 }
1270 1270
1271 void QuicConnection::NeuterUnencryptedPackets() { 1271 void QuicConnection::DiscardUnencryptedPackets() {
1272 sent_packet_manager_.NeuterUnencryptedPackets(); 1272 sent_packet_manager_.DiscardUnencryptedPackets();
1273 // This may have changed the retransmission timer, so re-arm it. 1273 // This may have changed the retransmission timer, so re-arm it.
1274 retransmission_alarm_->Cancel(); 1274 retransmission_alarm_->Cancel();
1275 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime(); 1275 QuicTime retransmission_time = sent_packet_manager_.GetRetransmissionTime();
1276 if (retransmission_time != QuicTime::Zero()) { 1276 if (retransmission_time != QuicTime::Zero()) {
1277 retransmission_alarm_->Set(retransmission_time); 1277 retransmission_alarm_->Set(retransmission_time);
1278 } 1278 }
1279 } 1279 }
1280 1280
1281 bool QuicConnection::ShouldGeneratePacket( 1281 bool QuicConnection::ShouldGeneratePacket(
1282 TransmissionType transmission_type, 1282 TransmissionType transmission_type,
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1962 // If we changed the generator's batch state, restore original batch state. 1962 // If we changed the generator's batch state, restore original batch state.
1963 if (!already_in_batch_mode_) { 1963 if (!already_in_batch_mode_) {
1964 DVLOG(1) << "Leaving Batch Mode."; 1964 DVLOG(1) << "Leaving Batch Mode.";
1965 connection_->packet_generator_.FinishBatchOperations(); 1965 connection_->packet_generator_.FinishBatchOperations();
1966 } 1966 }
1967 DCHECK_EQ(already_in_batch_mode_, 1967 DCHECK_EQ(already_in_batch_mode_,
1968 connection_->packet_generator_.InBatchMode()); 1968 connection_->packet_generator_.InBatchMode());
1969 } 1969 }
1970 1970
1971 } // namespace net 1971 } // namespace net
OLDNEW
« no previous file with comments | « net/quic/quic_connection.h ('k') | net/quic/quic_sent_packet_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698