From: Timo Sirainen Date: Mon, 25 Oct 2010 21:22:48 +0000 (+0100) Subject: dsync: Make sure MSG-GET command doesn't hang. X-Git-Tag: 2.0.7~45 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1ebce8085bb1aec1fe6ad2370f2ef5ec5ee4a999;p=thirdparty%2Fdovecot%2Fcore.git dsync: Make sure MSG-GET command doesn't hang. --- diff --git a/src/dsync/dsync-proxy-server-cmd.c b/src/dsync/dsync-proxy-server-cmd.c index 52abd68cea..c763d7fe0a 100644 --- a/src/dsync/dsync-proxy-server-cmd.c +++ b/src/dsync/dsync-proxy-server-cmd.c @@ -511,6 +511,11 @@ cmd_msg_get_callback(enum dsync_msg_get_result result, /* then we'll still have to send the message body. */ server->get_input = data->input; cmd_msg_get_send_more(server); + if (server->get_input == NULL) { + /* if we came here from ioloop, make sure the command gets + freed in the output flush callback */ + o_stream_set_flush_pending(server->output, TRUE); + } } static int