[Pkg-owncloud-commits] [owncloud-client] 471/498: Propagator: do not use parallelism when we have bandwidth limit
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:19 UTC 2015
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 29d7903c22876ea36e8bba7b1a7608e952033917
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Thu Aug 6 11:10:27 2015 +0200
Propagator: do not use parallelism when we have bandwidth limit
When user wants to limit the bandwidth, he does not care about speed
anymore. And parallelism on slow network might cause problems.
For issue #3382
Will also help for #3095
(cherry picked from commit b20f29f22797367c7aa92bd74389c99b10c852a4)
---
src/libsync/owncloudpropagator.cpp | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp
index 01dde3a..2eaed4f 100644
--- a/src/libsync/owncloudpropagator.cpp
+++ b/src/libsync/owncloudpropagator.cpp
@@ -51,6 +51,11 @@ OwncloudPropagator::~OwncloudPropagator()
/* The maximum number of active job in parallel */
int OwncloudPropagator::maximumActiveJob()
{
+ if (_downloadLimit != 0 || _uploadLimit != 0) {
+ // disable parallelism when there is a network limit.
+ return 1;
+ }
+
static int max = qgetenv("OWNCLOUD_MAX_PARALLEL").toUInt();
if (!max) {
max = 3; //default
--
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