Mercurial > dovecot > core-2.2
changeset 12354:a408c08784bc
dsync: Added more idle timeout resets to proxying.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Mon, 25 Oct 2010 22:13:05 +0100 |
parents | 94be7b193c48 |
children | 601065674f74 |
files | src/dsync/dsync-proxy-client.c |
diffstat | 1 files changed, 22 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dsync/dsync-proxy-client.c Mon Oct 25 19:26:34 2010 +0100 +++ b/src/dsync/dsync-proxy-client.c Mon Oct 25 22:13:05 2010 +0100 @@ -153,6 +153,7 @@ io_remove(&worker->io); proxy_client_worker_msg_get_finish(worker); } + timeout_reset(worker->to); } static void @@ -328,9 +329,9 @@ if (worker->to_input != NULL) timeout_remove(&worker->to_input); - timeout_reset(worker->to); if (worker->worker.input_callback != NULL) { worker->worker.input_callback(worker->worker.input_context); + timeout_reset(worker->to); return; } @@ -348,13 +349,14 @@ don't get back here. */ timeout_remove(&worker->to_input); } + timeout_reset(worker->to); } -static int proxy_client_worker_output(struct proxy_client_dsync_worker *worker) +static int +proxy_client_worker_output_real(struct proxy_client_dsync_worker *worker) { int ret; - timeout_reset(worker->to); if ((ret = o_stream_flush(worker->output)) < 0) return 1; @@ -371,6 +373,15 @@ return ret; } +static int proxy_client_worker_output(struct proxy_client_dsync_worker *worker) +{ + int ret; + + ret = proxy_client_worker_output_real(worker); + timeout_reset(worker->to); + return ret; +} + static void proxy_client_worker_timeout(void *context ATTR_UNUSED) { i_error("proxy client timed out"); @@ -962,7 +973,8 @@ aqueue_append(worker->request_queue, &request); } -static void proxy_client_send_stream(struct proxy_client_dsync_worker *worker) +static void +proxy_client_send_stream_real(struct proxy_client_dsync_worker *worker) { dsync_worker_save_callback_t *callback; const unsigned char *data; @@ -1014,6 +1026,12 @@ callback(worker->save_context); } +static void proxy_client_send_stream(struct proxy_client_dsync_worker *worker) +{ + proxy_client_send_stream_real(worker); + timeout_reset(worker->to); +} + static void proxy_client_worker_msg_save(struct dsync_worker *_worker, const struct dsync_message *msg,