adjustments to aggregate acknowledgement
Some checks failed
Build and Test / friends (push) Failing after 3m17s
Build and Test / fast-racing-neo (push) Successful in 4m36s
Build and Test / puyopuyo (push) Successful in 4m37s
Build and Test / sonic-transformed (push) Successful in 4m39s
Build and Test / minecraft-wiiu (push) Successful in 4m39s
Build and Test / splatoon-testfire (push) Successful in 5m20s
Build and Test / splatoon (push) Successful in 5m20s
Build and Test / wii-u-chat (push) Successful in 5m27s
Build and Test / super-mario-maker (push) Successful in 5m27s
Build and Test / mario-tennis (push) Successful in 5m28s
Build and Test / wii-sports-club (push) Successful in 5m32s

This commit is contained in:
Maple Nebel 2026-07-19 00:28:07 +02:00
commit 9b2287a3f0

View file

@ -705,19 +705,7 @@ impl<T: CryptoHandler> AnyInternalSocket for InternalSocket<T> {
let conn = &**conn;
let mut conn = conn.lock().await;
if conn.supported_function_version == 1 {
let mut collected_ids: Vec<u16> = Vec::new();
let mut cursor = Cursor::new(&packet.payload);
while let Ok(v) = read_u16(&mut cursor) {
collected_ids.push(v);
}
conn.unacknowleged_packets.retain_mut(|(_, up)| {
!(collected_ids.iter().any(|id| up.header.sequence_id == *id)
|| up.header.sequence_id <= packet.header.sequence_id)
});
} else {
if packet.header.substream_id == 1 {
let mut collected_ids: Vec<u16> = Vec::new();
let mut cursor = Cursor::new(&packet.payload);
@ -744,10 +732,22 @@ impl<T: CryptoHandler> AnyInternalSocket for InternalSocket<T> {
collected_ids.push(additional_sequence_id);
}
conn.unacknowleged_packets.retain_mut(|(_, up)| {
conn.unacknowleged_packets.retain(|(_, up)| {
!(collected_ids.iter().any(|id| up.header.sequence_id == *id)
|| up.header.sequence_id <= sequence_id)
});
} else {
let mut collected_ids: Vec<u16> = Vec::new();
let mut cursor = Cursor::new(&packet.payload);
while let Ok(v) = read_u16(&mut cursor) {
collected_ids.push(v);
}
conn.unacknowleged_packets.retain(|(_, up)| {
!(collected_ids.iter().any(|id| up.header.sequence_id == *id)
|| up.header.sequence_id <= packet.header.sequence_id)
});
}
} else {
error!("non connection acknowledgement packet on nonexistent connection...")