Mercurial > dovecot > core-2.2
changeset 12742:b1992c77e9d2
dsync: Error handling fix to "proxy client timed out".
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Thu, 17 Feb 2011 10:55:38 +0200 |
parents | 7ce47a476656 |
children | b48c31797b93 |
files | src/dsync/dsync-proxy-client.c |
diffstat | 1 files changed, 4 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- 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);