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

Unified Diff: net/quic/core/quic_connection.cc

Issue 2403193003: Landing Recent QUIC changes until 9:41 AM, Oct 10, 2016 UTC-7 (Closed)
Patch Set: git cl format Created 4 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/quic/core/quic_connection.cc
diff --git a/net/quic/core/quic_connection.cc b/net/quic/core/quic_connection.cc
index dadba8c67c7b3871d8b6459a9da4cd37c3b17408..ab062022b85958c3072a8ffb6abd92a92a83712e 100644
--- a/net/quic/core/quic_connection.cc
+++ b/net/quic/core/quic_connection.cc
@@ -281,7 +281,6 @@ QuicConnection::QuicConnection(QuicConnectionId connection_id,
packets_between_mtu_probes_(kPacketsBetweenMtuProbesBase),
next_mtu_probe_at_(kPacketsBetweenMtuProbesBase),
largest_received_packet_size_(0),
- largest_packet_size_supported_(std::numeric_limits<QuicByteCount>::max()),
goaway_sent_(false),
goaway_received_(false),
multipath_enabled_(false),
@@ -1418,11 +1417,6 @@ void QuicConnection::WriteAndBundleAcksIfNotBlocked() {
}
bool QuicConnection::ProcessValidatedPacket(const QuicPacketHeader& header) {
- if (header.fec_flag) {
- // Drop any FEC packet.
- return false;
- }
-
if (perspective_ == Perspective::IS_SERVER &&
IsInitializedIPEndPoint(self_address_) &&
IsInitializedIPEndPoint(last_packet_destination_address_) &&
@@ -2454,8 +2448,14 @@ QuicByteCount QuicConnection::GetLimitedMaxPacketSize(
const QuicByteCount writer_limit = writer_->GetMaxPacketSize(peer_address());
- return std::min({suggested_max_packet_size, writer_limit, kMaxPacketSize,
- largest_packet_size_supported_});
+ QuicByteCount max_packet_size = suggested_max_packet_size;
+ if (max_packet_size > writer_limit) {
+ max_packet_size = writer_limit;
+ }
+ if (max_packet_size > kMaxPacketSize) {
+ max_packet_size = kMaxPacketSize;
+ }
+ return max_packet_size;
}
void QuicConnection::SendMtuDiscoveryPacket(QuicByteCount target_mtu) {
« no previous file with comments | « net/quic/core/quic_connection.h ('k') | net/quic/core/quic_connection_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698