Enforce minimum keep alive / poll interval

This commit is contained in:
M66B 2020-05-06 10:59:42 +02:00
parent 6ce2b95328
commit 23107350ea
2 changed files with 2 additions and 2 deletions

View File

@ -1114,7 +1114,7 @@ public class FragmentAccount extends FragmentBase {
account.keep_alive_failed = 0;
account.keep_alive_succeeded = 0;
}
account.poll_interval = poll_interval;
account.poll_interval = Math.max(1, poll_interval);
account.partial_fetch = partial_fetch;
account.ignore_size = ignore_size;

View File

@ -379,7 +379,7 @@ public class FragmentPop extends FragmentBase {
account.leave_deleted = leave_deleted;
account.leave_on_device = leave_device;
account.max_messages = (TextUtils.isEmpty(max) ? null : Integer.parseInt(max));
account.poll_interval = Integer.parseInt(interval);
account.poll_interval = Math.max(1, Integer.parseInt(interval));
if (!update)
account.created = now;