diff src/dsync/dsync-brain.c @ 12028:6ef21adeb61d

dsync: If worker fails, abort earlier.
author Timo Sirainen <tss@iki.fi>
date Mon, 23 Aug 2010 14:35:50 +0100
parents 88309dcfdab5
children eb5adb193064
line wrap: on
line diff
--- a/src/dsync/dsync-brain.c	Mon Aug 23 14:30:08 2010 +0100
+++ b/src/dsync/dsync-brain.c	Mon Aug 23 14:35:50 2010 +0100
@@ -804,6 +804,12 @@
 
 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) {