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