dovecot-2.0: dsync: Added more idle timeout resets to proxying.
dovecot at dovecot.org
dovecot at dovecot.org
Tue Oct 26 00:13:07 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/a408c08784bc
changeset: 12354:a408c08784bc
user: Timo Sirainen <tss at iki.fi>
date: Mon Oct 25 22:13:05 2010 +0100
description:
dsync: Added more idle timeout resets to proxying.
diffstat:
src/dsync/dsync-proxy-client.c | 26 ++++++++++++++++++++++----
1 files changed, 22 insertions(+), 4 deletions(-)
diffs (78 lines):
diff -r 94be7b193c48 -r a408c08784bc src/dsync/dsync-proxy-client.c
--- 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,
More information about the dovecot-cvs
mailing list