[Pkg-owncloud-commits] [owncloud-client] 21/70: Legacy propagator jobs: Do not limit bandwidth when aborting

Sandro Knauß hefee-guest at moszumanska.debian.org
Tue Jul 1 10:21:19 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 646eafb05da8f751780834a5191b2b2c7d46efd3
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Wed Jun 18 15:09:19 2014 +0200

    Legacy propagator jobs: Do not limit bandwidth when aborting
    
    When aborting, we want the last job to be as fast as possible
    as it blocks the UI.  So don't limit the bandwidth in that case
---
 src/mirall/propagator_legacy.cpp | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/src/mirall/propagator_legacy.cpp b/src/mirall/propagator_legacy.cpp
index 6d3ffd5..34ae55d 100644
--- a/src/mirall/propagator_legacy.cpp
+++ b/src/mirall/propagator_legacy.cpp
@@ -305,6 +305,11 @@ bool PropagateNeonJob::updateMTimeAndETag(const char* uri, time_t mtime)
 
 void PropagateNeonJob::limitBandwidth(qint64 progress, qint64 bandwidth_limit)
 {
+    if (_propagator->_abortRequested.fetchAndAddRelaxed(0)) {
+        // Do not limit bandwidth when aborting to speed up the current transfer
+        return;
+    }
+
     if (bandwidth_limit > 0) {
         int64_t diff = _lastTime.nsecsElapsed() / 1000;
         int64_t len = progress - _lastProgress;

-- 
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