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

Unified Diff: net/tools/quic/quic_packet_reader.cc

Issue 1404873003: relnote: Avoid redundant recvmmsg when the previous recvmmsg returned (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@QUIC_test_tools_104305494
Patch Set: Created 5 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/tools/quic/quic_packet_reader.h ('k') | net/tools/quic/quic_server.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/tools/quic/quic_packet_reader.cc
diff --git a/net/tools/quic/quic_packet_reader.cc b/net/tools/quic/quic_packet_reader.cc
index 1982269f30bc3b47c49750d9f745a67a38507ecc..1f368a683dca28d44660eb32ae83a63d982642dc 100644
--- a/net/tools/quic/quic_packet_reader.cc
+++ b/net/tools/quic/quic_packet_reader.cc
@@ -14,6 +14,7 @@
#include "base/logging.h"
#include "net/base/ip_endpoint.h"
+#include "net/quic/quic_flags.h"
#include "net/tools/quic/quic_dispatcher.h"
#include "net/tools/quic/quic_socket_utils.h"
@@ -103,7 +104,12 @@ bool QuicPacketReader::ReadAndDispatchPackets(
packets_dropped);
}
- return true;
+ if (FLAGS_quic_read_packets_full_recvmmsg) {
+ // We may not have read all of the packets available on the socket.
+ return packets_read == kNumPacketsPerReadMmsgCall;
+ } else {
+ return true;
+ }
#else
LOG(FATAL) << "Unsupported";
return false;
« no previous file with comments | « net/tools/quic/quic_packet_reader.h ('k') | net/tools/quic/quic_server.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698