mirror of
https://gitlab.com/veloren/veloren.git
synced 2024-08-30 18:12:32 +00:00
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:
parent
ac734d0a48
commit
754bf32580
@ -130,6 +130,9 @@ impl PrioManager {
|
||||
continue;
|
||||
}
|
||||
process_stream(sid, stream, per_stream_bytes, &mut cur_bytes);
|
||||
if cur_bytes >= total_bytes {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user