Function fail_superseded_acks
pub(super) fn fail_superseded_acks(
client: &Client<JournaledSession>,
acks: &mut HashMap<PacketId, PendingAck>,
deadlines: Option<&mut BTreeSet<(Instant, PacketId)>>,
)Expand description
Fails every parked SUBSCRIBE/UNSUBSCRIBE completion whose packet id no longer owns any filter entry. A later request for the same filter superseded it in the core (one filter is one entry), so the orphaned packet id is never put on the wire and its SUBACK/UNSUBACK can never arrive; the future would otherwise hang. Mirrors the broker replacing the prior subscription with the newer one.
Call after recording a SUBSCRIBE/UNSUBSCRIBE. The check is O(acks x filters) but only runs on user-paced subscribe/unsubscribe, and the common no-overlap case fails nothing.