dovecot-2.0: dsync: Error handling fix to "proxy client timed out".

dovecot at dovecot.org dovecot at dovecot.org
Thu Feb 17 10:57:10 EET 2011


details:   http://hg.dovecot.org/dovecot-2.0/rev/b1992c77e9d2
changeset: 12607:b1992c77e9d2
user:      Timo Sirainen <tss at iki.fi>
date:      Thu Feb 17 10:55:38 2011 +0200
description:
dsync: Error handling fix to "proxy client timed out".

diffstat:

 src/dsync/dsync-proxy-client.c |  7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

diffs (26 lines):

diff -r 7ce47a476656 -r b1992c77e9d2 src/dsync/dsync-proxy-client.c
--- a/src/dsync/dsync-proxy-client.c	Thu Feb 17 10:55:07 2011 +0200
+++ b/src/dsync/dsync-proxy-client.c	Thu Feb 17 10:55:38 2011 +0200
@@ -382,10 +382,11 @@
 	return ret;
 }
 
-static void proxy_client_worker_timeout(void *context ATTR_UNUSED)
+static void
+proxy_client_worker_timeout(struct proxy_client_dsync_worker *worker)
 {
 	i_error("proxy client timed out");
-	master_service_stop(master_service);
+	proxy_client_fail(worker);
 }
 
 struct dsync_worker *dsync_worker_init_proxy_client(int fd_in, int fd_out)
@@ -397,7 +398,7 @@
 	worker->fd_in = fd_in;
 	worker->fd_out = fd_out;
 	worker->to = timeout_add(DSYNC_PROXY_TIMEOUT_MSECS,
-				 proxy_client_worker_timeout, NULL);
+				 proxy_client_worker_timeout, worker);
 	worker->io = io_add(fd_in, IO_READ, proxy_client_worker_input, worker);
 	worker->input = i_stream_create_fd(fd_in, (size_t)-1, FALSE);
 	worker->output = o_stream_create_fd(fd_out, (size_t)-1, FALSE);


More information about the dovecot-cvs mailing list