]> granicus.if.org Git - mutt/commitdiff
Catch another possible race when starting IDLE.
authorBrendan Cully <brendan@kublai.com>
Mon, 19 Dec 2005 18:03:41 +0000 (18:03 +0000)
committerBrendan Cully <brendan@kublai.com>
Mon, 19 Dec 2005 18:03:41 +0000 (18:03 +0000)
imap/imap.c

index d34baf02303991caaa1935c735ce6a2f5bdfafa4..51de3db50db893885c1d5c93ac2555b98528beba 100644 (file)
@@ -1284,7 +1284,9 @@ int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force)
     do
       result = imap_cmd_step (idata);
     while (result == IMAP_CMD_CONTINUE);
-    if (result != IMAP_CMD_RESPOND)
+    /* it's possible that we were notified and fetched mail before
+     * getting to the +, in which case we've automatically unidled. */
+    if (result != IMAP_CMD_RESPOND && result != IMAP_CMD_OK)
     {
       dprint (1, (debugfile, "Error starting IDLE\n"));
       idata->state = IMAP_SELECTED;