]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Don't notify replicator process about successful dsync if the dsync failed.
authorTimo Sirainen <tss@iki.fi>
Wed, 22 May 2013 11:56:41 +0000 (14:56 +0300)
committerTimo Sirainen <tss@iki.fi>
Wed, 22 May 2013 11:56:41 +0000 (14:56 +0300)
src/doveadm/dsync/doveadm-dsync.c

index 156830237672154714d4dbecc740047c6960233e..73cfe6026e1bad6429b301c91dc59d04ef02488e 100644 (file)
@@ -949,7 +949,7 @@ cmd_dsync_server_run(struct doveadm_mail_cmd_context *_ctx,
                o_stream_close(_ctx->conn->output);
        }
 
-       if (ctx->replicator_notify)
+       if (ctx->replicator_notify && _ctx->exit_code == 0)
                dsync_replicator_notify(ctx, sync_type, str_c(state_str));
        return _ctx->exit_code == 0 ? 0 : -1;
 }