diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2000-03-21 13:23:01 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2000-03-21 13:23:01 +0000 |
commit | f85c9d8ce690267f9b767aaaf877c87099404c9d (patch) | |
tree | f28dfc80a20b61eb415dc7963535ea1136b030d9 /imap.c | |
parent | 1ae9b3525fcdbf175988b927f921b442412550fe (diff) | |
download | fetchmail-f85c9d8ce690267f9b767aaaf877c87099404c9d.tar.gz fetchmail-f85c9d8ce690267f9b767aaaf877c87099404c9d.tar.bz2 fetchmail-f85c9d8ce690267f9b767aaaf877c87099404c9d.zip |
Attempt to fix IDLE.
svn path=/trunk/; revision=2831
Diffstat (limited to 'imap.c')
-rw-r--r-- | imap.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -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")); |