dovecot-2.0: dsync: Assert-crashfix with remote dsyncing.
dovecot at dovecot.org
dovecot at dovecot.org
Mon Aug 23 18:24:50 EEST 2010
details: http://hg.dovecot.org/dovecot-2.0/rev/f5e8fffacc92
changeset: 12036:f5e8fffacc92
user: Timo Sirainen <tss at iki.fi>
date: Mon Aug 23 16:24:22 2010 +0100
description:
dsync: Assert-crashfix with remote dsyncing.
diffstat:
src/dsync/dsync-proxy-client.c | 10 +++++++++-
1 files changed, 9 insertions(+), 1 deletions(-)
diffs (27 lines):
diff -r d2b49c7d4046 -r f5e8fffacc92 src/dsync/dsync-proxy-client.c
--- a/src/dsync/dsync-proxy-client.c Mon Aug 23 16:09:11 2010 +0100
+++ b/src/dsync/dsync-proxy-client.c Mon Aug 23 16:24:22 2010 +0100
@@ -140,7 +140,9 @@
while ((i_stream_read_data(input, &data, &size, 0)) > 0)
i_stream_skip(input, size);
- /* some input may already be buffered */
+ /* some input may already be buffered. note that we may be coming here
+ from the input function itself, in which case this timeout must not
+ be called (we'll remove it later) */
if (worker->to_input == NULL) {
worker->to_input =
timeout_add(0, proxy_client_worker_input, worker);
@@ -314,6 +316,12 @@
/* try to continue */
proxy_client_worker_next_reply(worker, "");
}
+
+ if (worker->to_input != NULL) {
+ /* input stream's destroy callback was already called.
+ don't get back here. */
+ timeout_remove(&worker->to_input);
+ }
}
static int proxy_client_worker_output(struct proxy_client_dsync_worker *worker)
More information about the dovecot-cvs
mailing list