Mercurial > dovecot > core-2.2
changeset 12843:4b537650b4de
dsync: If remote dsync times out, log a more verbose reason.
author | Timo Sirainen <tss@iki.fi> |
---|---|
date | Sat, 12 Mar 2011 15:48:24 +0200 |
parents | e83eec6d0126 |
children | b896d72d7fa7 |
files | src/dsync/dsync-proxy-client.c |
diffstat | 1 files changed, 15 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/src/dsync/dsync-proxy-client.c Sat Mar 12 15:27:54 2011 +0200 +++ b/src/dsync/dsync-proxy-client.c Sat Mar 12 15:48:24 2011 +0200 @@ -387,7 +387,21 @@ static void proxy_client_worker_timeout(struct proxy_client_dsync_worker *worker) { - i_error("proxy client timed out"); + const char *reason; + + if (worker->save_io != NULL) + reason = " (waiting for more input from mail being saved)"; + else if (worker->save_input != NULL) { + size_t bytes = o_stream_get_buffer_used_size(worker->output); + + reason = t_strdup_printf(" (waiting for output stream to flush, " + "%"PRIuSIZE_T" bytes left)", bytes); + } else if (worker->msg_get_data.input != NULL) { + reason = " (waiting for MSG-GET message from remote)"; + } else { + reason = ""; + } + i_error("proxy client timed out%s", reason); proxy_client_fail(worker); }