mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Fix app limited to account for peer created streams
Summary: Previously updateAppLimited was not accounting for peer created streams. This moves app limited accounting into the stream manager This also makes a subtle change to the applimited callback. We assume that we start off as not app limited now, so if we create a stream we will not call the congestion controller app limited callback. Reviewed By: mjoras Differential Revision: D15166114 fbshipit-source-id: 1a8d573533861f53bb1bd9fdc605dfefe68902dc
This commit is contained in:
committed by
Facebook Github Bot
parent
ba1ce44645
commit
1d9e4034c9
@@ -1472,10 +1472,10 @@ TEST_P(QuicTransportImplTestUniBidi, AppLimitedTest) {
|
||||
auto rawCongestionController = mockCongestionController.get();
|
||||
conn.congestionController = std::move(mockCongestionController);
|
||||
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(false, _)).Times(1);
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(false, _)).Times(0);
|
||||
auto stream = createStream(transport, GetParam());
|
||||
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(true, _)).Times(1);
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(true, _));
|
||||
transport->closeStream(stream);
|
||||
}
|
||||
|
||||
@@ -1485,7 +1485,7 @@ TEST_P(QuicTransportImplTestUniBidi, AppLimitedTestControlStreams) {
|
||||
auto rawCongestionController = mockCongestionController.get();
|
||||
conn.congestionController = std::move(mockCongestionController);
|
||||
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(false, _)).Times(1);
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(false, _)).Times(0);
|
||||
auto stream = createStream(transport, GetParam());
|
||||
ASSERT_TRUE(stream);
|
||||
|
||||
@@ -1496,7 +1496,7 @@ TEST_P(QuicTransportImplTestUniBidi, AppLimitedTestControlStreams) {
|
||||
ASSERT_TRUE(ctrlStream2);
|
||||
transport->setControlStream(ctrlStream2);
|
||||
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(true, _)).Times(1);
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(true, _));
|
||||
transport->closeStream(stream);
|
||||
}
|
||||
|
||||
@@ -1506,7 +1506,6 @@ TEST_P(QuicTransportImplTestUniBidi, AppLimitedTestOnlyControlStreams) {
|
||||
auto rawCongestionController = mockCongestionController.get();
|
||||
conn.congestionController = std::move(mockCongestionController);
|
||||
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(false, _)).Times(1);
|
||||
auto ctrlStream1 = createStream(transport, GetParam());
|
||||
EXPECT_CALL(*rawCongestionController, setAppLimited(true, _)).Times(1);
|
||||
transport->setControlStream(ctrlStream1);
|
||||
|
Reference in New Issue
Block a user