diff --git a/quic/state/stream/StreamStateFunctions.cpp b/quic/state/stream/StreamStateFunctions.cpp index f66b1d411..0d7479672 100644 --- a/quic/state/stream/StreamStateFunctions.cpp +++ b/quic/state/stream/StreamStateFunctions.cpp @@ -16,7 +16,6 @@ void resetQuicStream(QuicStreamState& stream, ApplicationErrorCode error) { stream.retransmissionBuffer.clear(); stream.writeBuffer.move(); ChainedByteRangeHead(std::move(stream.pendingWrites)); // Will be destructed - stream.readBuffer.clear(); stream.lossBuffer.clear(); stream.streamWriteError = error; stream.writeBufMeta.length = 0; diff --git a/quic/state/stream/test/StreamStateFunctionsTest.cpp b/quic/state/stream/test/StreamStateFunctionsTest.cpp index dfda8efcc..f3e1c0f13 100644 --- a/quic/state/stream/test/StreamStateFunctionsTest.cpp +++ b/quic/state/stream/test/StreamStateFunctionsTest.cpp @@ -50,7 +50,7 @@ TEST_F(StreamStateFunctionsTests, BasicResetTest) { // Something are cleared: EXPECT_TRUE(stream.writeBuffer.empty()); EXPECT_TRUE(stream.retransmissionBuffer.empty()); - EXPECT_TRUE(stream.readBuffer.empty()); + EXPECT_FALSE(stream.readBuffer.empty()); // The rest are untouched: EXPECT_EQ(stream.id, streamId);