Enforce minimum keep alive / poll interval

pull/178/head
M66B 5 years ago
parent 6ce2b95328
commit 23107350ea

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

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

Loading…
Cancel
Save