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; |