mirror of
https://github.com/facebookincubator/mvfst.git
synced 2025-08-08 09:42:06 +03:00
Unset stream write callback on reset
Summary: Resetting a stream has the semantics of abandoning all writes on that stream. As such, the application resetting the stream is an implicit signal that it does not care about further writes. It is reasonable then for an application to not expect further write callbacks to trigger. Reviewed By: lnicco Differential Revision: D20462859 fbshipit-source-id: b6701e6a262d618c5cd93fd1531095a134f6554e
This commit is contained in:
committed by
Facebook GitHub Bot
parent
bea6efc248
commit
694a9bb4cf
@@ -1451,6 +1451,17 @@ TEST_F(QuicTransportImplTest, TestImmediateClose) {
|
||||
evb->loopOnce();
|
||||
}
|
||||
|
||||
TEST_F(QuicTransportImplTest, ResetStreamUnsetWriteCallback) {
|
||||
auto stream = transport->createBidirectionalStream().value();
|
||||
NiceMock<MockWriteCallback> wcb;
|
||||
EXPECT_CALL(wcb, onStreamWriteError(stream, _)).Times(0);
|
||||
transport->notifyPendingWriteOnStream(stream, &wcb);
|
||||
EXPECT_FALSE(
|
||||
transport->resetStream(stream, GenericApplicationErrorCode::UNKNOWN)
|
||||
.hasError());
|
||||
evb->loopOnce();
|
||||
}
|
||||
|
||||
TEST_F(QuicTransportImplTest, DestroyWithoutClosing) {
|
||||
EXPECT_CALL(connCallback, onConnectionError(_)).Times(0);
|
||||
EXPECT_CALL(connCallback, onConnectionEnd()).Times(0);
|
||||
|
Reference in New Issue
Block a user