mirror of
https://github.com/moparisthebest/k-9
synced 2024-12-25 09:08:49 -05:00
Only use the IDLE timeout for the folder while actually in IDLE state.
May help with Issue 1022, Issue 952, Issue 895
This commit is contained in:
parent
f3e06b4ef5
commit
a89bd8e081
@ -2378,6 +2378,7 @@ public class ImapStore extends Store
|
||||
{
|
||||
if (doneSent.compareAndSet(false, true) == true)
|
||||
{
|
||||
mConnection.setReadTimeout(Store.SOCKET_READ_TIMEOUT);
|
||||
sendContinuation("DONE");
|
||||
}
|
||||
}
|
||||
@ -2432,8 +2433,7 @@ public class ImapStore extends Store
|
||||
receiver.pushError("IMAP server is not IDLE capable: " + mConnection.toString(), null);
|
||||
throw new MessagingException("IMAP server is not IDLE capable:" + mConnection.toString());
|
||||
}
|
||||
mConnection.setReadTimeout(IDLE_READ_TIMEOUT);
|
||||
|
||||
|
||||
if (responses != null)
|
||||
{
|
||||
handleUntaggedResponses(responses);
|
||||
@ -2483,6 +2483,7 @@ public class ImapStore extends Store
|
||||
receiver.setPushActive(getName(), true);
|
||||
idling.set(true);
|
||||
doneSent.set(false);
|
||||
mConnection.setReadTimeout(IDLE_READ_TIMEOUT);
|
||||
untaggedResponses = executeSimpleCommand("IDLE", false, ImapFolderPusher.this);
|
||||
idling.set(false);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user