Small improvement

This commit is contained in:
M66B 2020-10-31 15:05:59 +01:00
parent 62f6938bcb
commit 87b556ff97
1 changed files with 4 additions and 4 deletions

View File

@ -1746,10 +1746,10 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
}
// Autofix too many simultaneous connections
if (ConnectionHelper.isMaxConnections(last_fail)) {
boolean auto_optimize = prefs.getBoolean("auto_optimize", false);
if (auto_optimize ||
account.last_connected == null ||
boolean auto_optimize = prefs.getBoolean("auto_optimize", false);
if (auto_optimize &&
ConnectionHelper.isMaxConnections(last_fail)) {
if (account.last_connected == null ||
now - account.last_connected > AUTOFIX_TOO_MANY_FOLDERS) {
int user = 0;
int system = 0;