Propagator: Re-order statement of previous commit

The user should be allowed to override.
For issue #3382
Will also help for #3095
This commit is contained in:
Markus Goetz 2015-08-06 15:28:09 +02:00
parent 29d7903c22
commit 593aa003d6

View File

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