IDLE DONE on "Still here"

pull/190/head
M66B 4 years ago
parent 2cf4158108
commit 02dec069d0

@ -3270,6 +3270,16 @@ public class IMAPProtocol extends Protocol {
boolean done = false; // done reading responses? boolean done = false; // done reading responses?
notifyResponseHandlers(responses); notifyResponseHandlers(responses);
if (r.isUnTagged() && r.isOK()) // Still here
try {
DataOutputStream output = (DataOutputStream) getOutputStream();
output.writeBytes("DONE");
output.write(CRLF);
output.flush();
} catch (IOException ex) {
throw new ProtocolException("IDLE/DONE", ex);
}
if (r.isBYE()) // shouldn't wait for command completion response if (r.isBYE()) // shouldn't wait for command completion response
done = true; done = true;

@ -973,13 +973,6 @@ public class ServiceSynchronize extends ServiceBase implements SharedPreferences
if (e.getMessageType() == StoreEvent.NOTICE) { if (e.getMessageType() == StoreEvent.NOTICE) {
EntityLog.log(ServiceSynchronize.this, account.name + " notice: " + message); EntityLog.log(ServiceSynchronize.this, account.name + " notice: " + message);
// Store NOOP
try {
iservice.getStore().isConnected();
} catch (Throwable ex) {
Log.e(ex);
}
if ("Still here".equals(message) && !isTransient(account)) { if ("Still here".equals(message) && !isTransient(account)) {
long now = new Date().getTime(); long now = new Date().getTime();
if (now - start < STILL_THERE_THRESHOLD) if (now - start < STILL_THERE_THRESHOLD)

Loading…
Cancel
Save