diff --git a/TunnelKit/Sources/Protocols/OpenVPN/ControlChannel.swift b/TunnelKit/Sources/Protocols/OpenVPN/ControlChannel.swift index 5b544d0c..7be6e59f 100644 --- a/TunnelKit/Sources/Protocols/OpenVPN/ControlChannel.swift +++ b/TunnelKit/Sources/Protocols/OpenVPN/ControlChannel.swift @@ -199,7 +199,7 @@ extension OpenVPN { } // drop queued out packets if ack-ed - for (i, packet) in queue.outbound.enumerated() { + for (i, packet) in queue.outbound.enumerated().reversed() { if packetIds.contains(packet.packetId) { queue.outbound.remove(at: i) }