mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-06 22:22:38 +03:00
Use correct value for messageSizes in SendmmsgInplacePacketBatchWriter
Summary: `messageSizes` is supposed to be the number of iovecs in each message, and not the length of the iovec. This was causing crashes in Edgeray (T215909454). Reviewed By: jbeshay Differential Revision: D70129535 fbshipit-source-id: 6d79e6ac0789402674e753297984b3691d371338
This commit is contained in:
committed by
Facebook GitHub Bot
parent
d119184a1e
commit
71b4e1c613
@@ -400,6 +400,8 @@ TEST_F(QuicBatchWriterTest, TestBatchingSendmmsgInplace) {
|
||||
std::make_shared<FollyQuicEventBase>(&evb);
|
||||
quic::test::MockAsyncUDPSocket sock(qEvb);
|
||||
|
||||
gsoSupported_ = false;
|
||||
|
||||
auto batchWriter = quic::BatchWriterFactory::makeBatchWriter(
|
||||
quic::QuicBatchingMode::BATCHING_MODE_SENDMMSG,
|
||||
kBatchNum,
|
||||
@@ -452,7 +454,7 @@ TEST_F(QuicBatchWriterTest, TestBatchingSendmmsgInplace) {
|
||||
EXPECT_EQ(count, kBatchNum);
|
||||
|
||||
for (size_t k = 0; k < count; k++) {
|
||||
EXPECT_EQ(messageSizes[k], expectedIovecs[k].iov_len);
|
||||
EXPECT_EQ(messageSizes[k], 1);
|
||||
EXPECT_EQ(expectedIovecs[k].iov_base, iovecs[k].iov_base);
|
||||
EXPECT_EQ(expectedIovecs[k].iov_len, iovecs[k].iov_len);
|
||||
}
|
||||
|
Reference in New Issue
Block a user