From 865fb4f3c1d7cd5c4740663d4f056842b843b5e7 Mon Sep 17 00:00:00 2001 From: Timo Sirainen Date: Thu, 14 Apr 2022 13:46:59 +0200 Subject: [PATCH] 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 --- src/doveadm/doveadm-print-server.c | 1 + 1 file changed, 1 insertion(+) 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) -- 2.47.3