]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Make sure MSG-GET command doesn't hang.
authorTimo Sirainen <tss@iki.fi>
Mon, 25 Oct 2010 21:22:48 +0000 (22:22 +0100)
committerTimo Sirainen <tss@iki.fi>
Mon, 25 Oct 2010 21:22:48 +0000 (22:22 +0100)
src/dsync/dsync-proxy-server-cmd.c

index 52abd68ceaba5bc25cc65d8e55fdef1a0653d1e5..c763d7fe0ac22d2db312ec1ca844098fdaefad9e 100644 (file)
@@ -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