Mainly fixes quota of quota error while saving.
while (brain->state != DSYNC_STATE_SYNC_END) {
old_state = brain->state;
dsync_brain_sync(brain);
+
+ if (dsync_worker_has_failed(brain->src_worker) ||
+ dsync_worker_has_failed(brain->dest_worker))
+ break;
+
i_assert(brain->state != old_state);
}
}
if ((ret = server->cur_cmd->func(server, server->cur_args)) == 0)
return 0;
- if (ret < 0)
+ if (ret < 0) {
i_error("command %s failed", server->cur_cmd->name);
+ return -1;
+ }
server->cur_cmd = NULL;
server->cur_args = NULL;
void *context)
{
if (!worker->readonly) {
- if (!worker->failed) T_BEGIN {
+ if (worker->failed)
+ callback(context);
+ else T_BEGIN {
worker->v.msg_save(worker, msg, data,
callback, context);
} T_END;