1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-08-08 09:42:06 +03:00

Split stream state machine into send and receive state machines

Summary: This is step 1 for removing reset on reset, since the send side may need to transition to waiting for a reset ack while the read side is an any state.

Reviewed By: lnicco

Differential Revision: D15075849

fbshipit-source-id: 1e094942a8a1ca9a01d4161cd6309b4136a9cfbf
This commit is contained in:
Alan Frindell
2019-05-06 13:29:41 -07:00
committed by Facebook Github Bot
parent 5c9c0821ff
commit 90e5e1b3f1
32 changed files with 753 additions and 769 deletions

View File

@@ -775,7 +775,7 @@ TEST_F(QuicTransportTest, RstStream) {
auto stream =
transport_->getConnectionState().streamManager->findStream(streamId);
ASSERT_TRUE(stream);
EXPECT_TRUE(isState<StreamStates::WaitingForRstAck>(*stream));
EXPECT_TRUE(isState<StreamSendStates::ResetSent>(stream->send));
EXPECT_TRUE(stream->retransmissionBuffer.empty());
EXPECT_TRUE(stream->writeBuffer.empty());
EXPECT_FALSE(stream->writable());
@@ -1245,7 +1245,7 @@ TEST_F(QuicTransportTest, RstWrittenStream) {
}
EXPECT_TRUE(foundReset);
EXPECT_TRUE(isState<StreamStates::WaitingForRstAck>(*stream));
EXPECT_TRUE(isState<StreamSendStates::ResetSent>(stream->send));
EXPECT_TRUE(stream->retransmissionBuffer.empty());
EXPECT_TRUE(stream->writeBuffer.empty());
EXPECT_FALSE(stream->writable());
@@ -1311,7 +1311,7 @@ TEST_F(QuicTransportTest, WriteAfterSendRst) {
transport_->resetStream(streamId, GenericApplicationErrorCode::UNKNOWN);
loopForWrites();
EXPECT_TRUE(isState<StreamStates::WaitingForRstAck>(*stream));
EXPECT_TRUE(isState<StreamSendStates::ResetSent>(stream->send));
EXPECT_TRUE(stream->retransmissionBuffer.empty());
EXPECT_TRUE(stream->writeBuffer.empty());
EXPECT_FALSE(stream->writable());