IDLE DONE on "Still here"

This commit is contained in:
M66B
2020-12-26 13:11:05 +01:00
parent 2cf4158108
commit 02dec069d0
2 changed files with 10 additions and 7 deletions

View File

@@ -3270,6 +3270,16 @@ public class IMAPProtocol extends Protocol {
boolean done = false; // done reading 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
done = true;