1
0
mirror of https://github.com/facebookincubator/mvfst.git synced 2025-11-10 21:22:20 +03:00
Files
mvfst/quic/state/test/QuicStateFunctionsTest.cpp
Dongchang He 49c73da3eb Skip updating ackState.needsToSendAckImmediately if ever set to true
Summary:
The goal of this change is to fix the bug that ```ackState.needsToSendActImmediately``` can be set to false even if it has been set to true. It leads to an issue when a batch of packets are consumed.

**Changes**
1. No longer set **false** for ```ackState.needsToSendAckImmediately```. If it is ever set to **true**, it continues to be **true**. Otherwise, it sticks to the default value of **false**.
1. Set ```ackState.scheduleAckTimeout``` to **true** only if ```ackState.needsToSendAckImmediately``` is **false**.
1. Always set ```ackState.numRxPacketsRecvd``` and ```ackState.numNonRxPacketsRecvd``` to **0** if ```ackState.needsToSendAckImmediately``` is **true**.

Reviewed By: yangchi

Differential Revision: D28241894

fbshipit-source-id: 988ac973beaa6b4348d99aa0bd6036318a6e1778
2021-05-07 12:46:57 -07:00

33 KiB