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

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

Issue 2403233003: Automated rollback of internal change 130388085. (Closed)
Patch Set: 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_flags_list.h » ('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 50aa1d80ddd94d43ea323e42ec29e1b637ee9eb9..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),
@@ -2449,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_flags_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698