From f85c9d8ce690267f9b767aaaf877c87099404c9d Mon Sep 17 00:00:00 2001 From: "Eric S. Raymond" Date: Tue, 21 Mar 2000 13:23:01 +0000 Subject: Attempt to fix IDLE. svn path=/trunk/; revision=2831 --- imap.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'imap.c') diff --git a/imap.c b/imap.c index fe8bffe7..9926dad2 100644 --- a/imap.c +++ b/imap.c @@ -100,7 +100,11 @@ int imap_ok(int sock, char *argbuf) */ if (idling) { - gen_send(sock, "DONE"); + /* we do our own write and report here to disable tagging */ + SockWrite(sock, "DONE\r\n", 6); + if (outlevel >= O_MONITOR) + report(stdout, "IMAP> DONE\n"); + idling = FALSE; } } @@ -1081,6 +1085,9 @@ static int imap_getrange(int sock, ok = internal_expunge(sock); count = -1; idling = do_idle; + if (idling) + /* this is the RFC2177-recommended timeout for an IDLE */ + mytimeout = 29 * 60; if (ok || gen_transact(sock, do_idle ? "IDLE" : "NOOP")) { report(stderr, _("re-poll failed\n")); -- cgit v1.2.3