From 6b5523e110d9a444b2e0a7a3c22bc6105fb5316a Mon Sep 17 00:00:00 2001 From: agnosticdev Date: Fri, 12 Jun 2026 07:19:09 -0700 Subject: [PATCH] agnosticdev/FixTestQUICDrop10ServerPackets: SwiftQUIC Fix testQUICDrop10ServerPackets when datapath logging is enabled --- Sources/SwiftNetwork/QUIC/QUICConnection.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Sources/SwiftNetwork/QUIC/QUICConnection.swift b/Sources/SwiftNetwork/QUIC/QUICConnection.swift index 433b836..8056a7f 100644 --- a/Sources/SwiftNetwork/QUIC/QUICConnection.swift +++ b/Sources/SwiftNetwork/QUIC/QUICConnection.swift @@ -2988,8 +2988,9 @@ public final class QUICConnection: ManyToManyApplicationStreamProtocol, else { return false } - // For ACK bundling purposes make sure to rely on the ACK-delay timer as much as possible - guard !applicationPendingItems.isAckOnly || delayedACK else { + // For ACK bundling purposes make sure to rely on the ACK-delay timer as much as possible, + // unless an immediate ACK needs to be processed. + guard !applicationPendingItems.isAckOnly || delayedACK || ack.immediateAcks > 0 else { // Make sure the ack-delay timer is armed if returning early ack.scheduleDelayedAck() return false