[Pkg-owncloud-commits] [owncloud-client] 15/27: network limit: Never wait more than 10 seconds

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Jul 29 16:23:59 UTC 2014


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit beb9300b4ee4e586682f34a5140d13709d39aca9
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Fri Jul 18 12:27:02 2014 +0200

    network limit: Never wait more than 10 seconds
    
    When using the "Limit automatically" limit, we wait for 25% of the time
    it took to upload something.
    However, if we go to sleep while uploading, the time it took to upload may take
    days. And waiting for 25% of a day is too long.
    So never wait for more than 10 seconds
    
    This may be related to issue #1880
---
 src/mirall/propagator_legacy.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/mirall/propagator_legacy.cpp b/src/mirall/propagator_legacy.cpp
index faf3cd1..839606e 100644
--- a/src/mirall/propagator_legacy.cpp
+++ b/src/mirall/propagator_legacy.cpp
@@ -328,8 +328,7 @@ void PropagateNeonJob::limitBandwidth(qint64 progress, qint64 bandwidth_limit)
             // -bandwidth_limit is the % of bandwidth
             int64_t wait_time = -diff * (1 + 100.0 / bandwidth_limit);
             if (wait_time > 0) {
-                Mirall::Utility::usleep(wait_time);
-
+                Mirall::Utility::usleep(qMin(wait_time, int64_t(1000000*10)));
             }
         }
         _lastTime.start();

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list