From: Timo Sirainen Date: Thu, 14 Apr 2022 11:46:59 +0000 (+0200) Subject: doveadm: Fix hang when flushing a corked print-ostream X-Git-Tag: 2.3.19~11 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=865fb4f3c1d7cd5c4740663d4f056842b843b5e7;p=thirdparty%2Fdovecot%2Fcore.git doveadm: Fix hang when flushing a corked print-ostream This could have happened at least with doveadm sync/backup command, i.e. causing replication to hang until timeout is reached: Error: write() failed: Timed out after 60 seconds --- diff --git a/src/doveadm/doveadm-print-server.c b/src/doveadm/doveadm-print-server.c index 86688231fd..93c6ed9253 100644 --- a/src/doveadm/doveadm-print-server.c +++ b/src/doveadm/doveadm-print-server.c @@ -87,6 +87,7 @@ static void doveadm_print_server_flush(void) o_stream_nsend(doveadm_print_ostream, str_data(ctx.str), str_len(ctx.str)); str_truncate(ctx.str, 0); + o_stream_uncork(doveadm_print_ostream); if (o_stream_get_buffer_used_size(doveadm_print_ostream) < IO_BLOCK_SIZE || doveadm_print_ostream->stream_errno != 0)