# HG changeset patch # User Timo Sirainen # Date 1297933025 -7200 # Node ID b48c31797b93b3aaa26e7a121697e4ebb67b33d7 # Parent b1992c77e9d271c33f21aca71c37bf5ace71798c dsync: Flush workers' output earlier when saving messages. diff -r b1992c77e9d2 -r b48c31797b93 src/dsync/dsync-brain-msgs-new.c --- a/src/dsync/dsync-brain-msgs-new.c Thu Feb 17 10:55:38 2011 +0200 +++ b/src/dsync/dsync-brain-msgs-new.c Thu Feb 17 10:57:05 2011 +0200 @@ -182,6 +182,11 @@ dest_iter->adding_msgs = FALSE; if (dsync_worker_output_flush(src_iter->worker) < 0) return -1; + if (dsync_worker_is_output_full(dest_iter->worker)) { + /* see if the output becomes less full by flushing */ + if (dsync_worker_output_flush(dest_iter->worker) < 0) + return -1; + } } return dsync_worker_is_output_full(dest_iter->worker) ? 0 : 1; }