changeset 7437:498975950370 HEAD

Workaround to never idle-disconnect IDLEing clients got broken by timeout code changes.
author Timo Sirainen <tss@iki.fi>
date Wed, 26 Mar 2008 21:27:10 +0200
parents cdb007c1923d
children 65fbb6226141
files src/imap/cmd-idle.c
diffstat 1 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/imap/cmd-idle.c	Sun Mar 23 17:55:51 2008 +0200
+++ b/src/imap/cmd-idle.c	Wed Mar 26 21:27:10 2008 +0200
@@ -102,12 +102,13 @@
 		return;
 	}
 
-	/* Sending this keeps NATs/stateful firewalls alive, and it also
-	   updates client->last_output so we don't ever disconnect the
-	   client. Sending this output should kill dead connections and there
-	   are several clients that really want to IDLE forever (Outlook
-	   especially). */
+	/* Sending this keeps NATs/stateful firewalls alive. Sending this
+	   also catches dead connections. */
 	client_send_line(ctx->client, "* OK Still here");
+	/* Make sure idling connections don't get disconnected. There are
+	   several clients that really want to IDLE forever and there's not
+	   much harm in letting them do so. */
+	timeout_reset(ctx->client->to_idle);
 }
 
 static void idle_sync_now(struct mailbox *box, struct cmd_idle_context *ctx)