mirror of
https://github.com/facebookincubator/mvfst.git
synced 2026-01-06 03:41:10 +03:00
Remove redundant check for ack state empty
Summary: removes the redundant check for ack states empty Reviewed By: yangchi Differential Revision: D15299534 fbshipit-source-id: c427b37987247dc4a4e11281464bc13f8645974c
This commit is contained in:
committed by
Facebook Github Bot
parent
408a2b8a09
commit
b7c6ff1676
@@ -33,14 +33,15 @@ quic::StreamFrameMetaData makeStreamFrameMetaDataFromStreamBuffer(
|
||||
namespace quic {
|
||||
|
||||
bool hasAcksToSchedule(const AckState& ackState) {
|
||||
if (ackState.acks.empty()) {
|
||||
folly::Optional<PacketNum> largestAckSend = largestAckToSend(ackState);
|
||||
if (!largestAckSend) {
|
||||
return false;
|
||||
}
|
||||
if (!ackState.largestAckScheduled) {
|
||||
// Never scheduled an ack, we need to send
|
||||
return true;
|
||||
}
|
||||
return *largestAckToSend(ackState) > *(ackState.largestAckScheduled);
|
||||
return *largestAckSend > *(ackState.largestAckScheduled);
|
||||
}
|
||||
|
||||
bool neverWrittenAcksBefore(const QuicConnectionStateBase& conn) {
|
||||
|
||||
Reference in New Issue
Block a user