dovecot-2.2: lib-imap-client: Make sure command timeout is used ...
dovecot at dovecot.org
dovecot at dovecot.org
Sun Nov 17 14:04:33 EET 2013
details: http://hg.dovecot.org/dovecot-2.2/rev/5726807ed06d
changeset: 16970:5726807ed06d
user: Timo Sirainen <tss at iki.fi>
date: Sun Nov 17 14:04:22 2013 +0200
description:
lib-imap-client: Make sure command timeout is used also for IDLE DONE.
diffstat:
src/lib-imap-client/imapc-connection.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
diffs (23 lines):
diff -r 54eb87b7761c -r 5726807ed06d src/lib-imap-client/imapc-connection.c
--- a/src/lib-imap-client/imapc-connection.c Sun Nov 17 01:04:50 2013 +0200
+++ b/src/lib-imap-client/imapc-connection.c Sun Nov 17 14:04:22 2013 +0200
@@ -953,7 +953,7 @@
conn->idle_plus_waiting = FALSE;
conn->idling = TRUE;
/* no timeouting while IDLEing */
- if (conn->to != NULL)
+ if (conn->to != NULL && !conn->idle_stopping)
timeout_remove(&conn->to);
} else if (cmds_count > 0 && cmds[0]->wait_for_literal) {
/* reply for literal */
@@ -1701,6 +1701,10 @@
if ((conn->idling || conn->idle_plus_waiting) && !conn->idle_stopping) {
conn->idle_stopping = TRUE;
o_stream_nsend_str(conn->output, "DONE\r\n");
+ if (conn->to == NULL) {
+ conn->to = timeout_add(conn->client->set.cmd_timeout_msecs,
+ imapc_command_timeout, conn);
+ }
}
}
More information about the dovecot-cvs
mailing list