mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
If there's lost data, we have data to write, take 2.
Summary: This is a bug that could prevent us from writing data if we ran out of connection flow control while we had lost data. The last attempt missed a mistake in the scheduling of sequential priority streams. Reviewed By: kvtsoy Differential Revision: D33030784 fbshipit-source-id: e1b82234346a604875a9ffe9ab7bc5fb398450ed
This commit is contained in:
committed by
Facebook GitHub Bot
parent
8cde858b62
commit
ca4705af0b
@@ -270,7 +270,17 @@ TEST_F(QuicTransportTest, NotAppLimitedWithLoss) {
|
||||
|
||||
auto stream = transport_->createBidirectionalStream().value();
|
||||
auto lossStream = transport_->createBidirectionalStream().value();
|
||||
conn.streamManager->addLoss(lossStream);
|
||||
auto lossStreamState = conn.streamManager->findStream(lossStream);
|
||||
ASSERT_TRUE(lossStreamState);
|
||||
auto largeBuf = folly::IOBuf::createChain(conn.udpSendPacketLen * 20, 4096);
|
||||
auto curBuf = largeBuf.get();
|
||||
do {
|
||||
curBuf->append(curBuf->capacity());
|
||||
curBuf = curBuf->next();
|
||||
} while (curBuf != largeBuf.get());
|
||||
lossStreamState->lossBuffer.emplace_back(std::move(largeBuf), 31, false);
|
||||
conn.streamManager->updateWritableStreams(*lossStreamState);
|
||||
conn.streamManager->updateLossStreams(*lossStreamState);
|
||||
transport_->writeChain(
|
||||
stream, IOBuf::copyBuffer("An elephant sitting still"), false, nullptr);
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited()).Times(0);
|
||||
|
Reference in New Issue
Block a user