From 1ebce8085bb1aec1fe6ad2370f2ef5ec5ee4a999 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Mon, 25 Oct 2010 22:22:48 +0100 Subject: [PATCH] dsync: Make sure MSG-GET command doesn't hang. --- src/dsync/dsync-proxy-server-cmd.c | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.47.3