mirror of
https://github.com/transmission/transmission
synced 2025-01-31 03:12:44 +00:00
fix: clamp down harder for upload as well (#5821)
This commit is contained in:
parent
d7473f22ed
commit
22da17f13f
1 changed files with 2 additions and 2 deletions
|
@ -277,8 +277,8 @@ size_t tr_bandwidth::clamp(uint64_t now, tr_direction dir, size_t byte_count) co
|
||||||
now = tr_time_msec();
|
now = tr_time_msec();
|
||||||
}
|
}
|
||||||
|
|
||||||
auto const current = this->get_raw_speed_bytes_per_second(now, TR_DOWN);
|
auto const current = this->get_raw_speed_bytes_per_second(now, dir);
|
||||||
auto const desired = this->get_desired_speed_bytes_per_second(TR_DOWN);
|
auto const desired = this->get_desired_speed_bytes_per_second(dir);
|
||||||
auto const r = desired >= 1 ? static_cast<double>(current) / desired : 0.0;
|
auto const r = desired >= 1 ? static_cast<double>(current) / desired : 0.0;
|
||||||
|
|
||||||
if (r > 1.0)
|
if (r > 1.0)
|
||||||
|
|
Loading…
Reference in a new issue