add a check to break the sending loop if the current bytes got greater than the total bytes.

We calculate a max bandwidth, but due to framing the packages, i think its possible for the current_bytes to get a few bytes over the actuall planed bandwidth. which prob isn't that bad/unfair
This commit is contained in:
Marcel Märtens 2022-06-08 09:45:25 +02:00
parent ac734d0a48
commit 754bf32580

View File

@ -130,6 +130,9 @@ impl PrioManager {
continue;
}
process_stream(sid, stream, per_stream_bytes, &mut cur_bytes);
if cur_bytes >= total_bytes {
break;
}
}
}
}