From 593aa003d66945f8596cb802d8b0fc4ecf68d76b Mon Sep 17 00:00:00 2001 From: Markus Goetz Date: Thu, 6 Aug 2015 15:28:09 +0200 Subject: [PATCH] Propagator: Re-order statement of previous commit The user should be allowed to override. For issue #3382 Will also help for #3095 --- src/libsync/owncloudpropagator.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/libsync/owncloudpropagator.cpp b/src/libsync/owncloudpropagator.cpp index 2eaed4f02d..8640bbb134 100644 --- a/src/libsync/owncloudpropagator.cpp +++ b/src/libsync/owncloudpropagator.cpp @@ -51,15 +51,16 @@ OwncloudPropagator::~OwncloudPropagator() /* The maximum number of active job in parallel */ int OwncloudPropagator::maximumActiveJob() { + static int max = qgetenv("OWNCLOUD_MAX_PARALLEL").toUInt(); + if (!max) { + max = 3; //default + } + 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 - } return max; }