Fix download limit trigger

This commit is contained in:
2023-01-30 11:09:16 +01:00
parent 365efe3f9e
commit 3b18934d27
3 changed files with 9 additions and 6 deletions

View File

@@ -42,8 +42,11 @@ const loop = async () => {
// If the usage has not changed we increase the timeout with one second. If
// it did change we halve the timeout
if (new_limits.transfer_limit_used === limits.transfer_limit_used) {
timeout_ms += 1000
if (
new_limits.transfer_limit_used === limits.transfer_limit_used &&
new_limits.transfer_limit === limits.transfer_limit
) {
timeout_ms += 2000
if (timeout_ms > 60000) {
timeout_ms = 60000
}