From ee9de50e7aabeb3a5875942527ed732699f22b64 Mon Sep 17 00:00:00 2001
From: Brendan Cully <brendan@kublai.com>
Date: Thu, 15 Dec 2005 18:25:49 +0000
Subject: [PATCH] IMAP keepalive might have been interacting badly with
 $timeout when IDLE was enabled. Use force option for IDLE too.

---
 imap/imap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/imap/imap.c b/imap/imap.c
index 0732cd13..8f14a84c 100644
--- a/imap/imap.c
+++ b/imap/imap.c
@@ -1187,7 +1187,7 @@ int imap_check_mailbox (CONTEXT *ctx, int *index_hint, int force)
   /* try IDLE first */
   if (option (OPTIMAPIDLE) && mutt_bit_isset (idata->capabilities, IDLE)
       && (idata->state != IMAP_IDLE
-          || time(NULL) >= idata->lastread + ImapKeepalive))
+          || force || time(NULL) >= idata->lastread + ImapKeepalive))
   {
     imap_cmd_start (idata, "IDLE");
     do
-- 
2.40.0