From: Timo Sirainen Date: Mon, 23 Aug 2010 13:35:50 +0000 (+0100) Subject: dsync: If worker fails, abort earlier. X-Git-Tag: 2.0.1~16 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=25ef927189baf704a86c9bf0a9459826719c3bff;p=thirdparty%2Fdovecot%2Fcore.git dsync: If worker fails, abort earlier. --- diff --git a/src/dsync/dsync-brain.c b/src/dsync/dsync-brain.c index 8c41d46966..470fc78aed 100644 --- a/src/dsync/dsync-brain.c +++ b/src/dsync/dsync-brain.c @@ -804,6 +804,12 @@ static void dsync_brain_worker_finished(bool success, void *context) void dsync_brain_sync(struct dsync_brain *brain) { + if (dsync_worker_has_failed(brain->src_worker) || + dsync_worker_has_failed(brain->dest_worker)) { + /* we can't safely continue, especially with backup */ + return; + } + if (brain->to != NULL) timeout_remove(&brain->to); switch (brain->state) {