From: Timo Sirainen Date: Sun, 20 Oct 2019 10:48:22 +0000 (+0300) Subject: dsync: Fix potential hang when initializing remote dsync X-Git-Tag: 2.3.9~96 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec817bb2185bb21b34ba6bdd83b32af16dd0b4ad;p=thirdparty%2Fdovecot%2Fcore.git dsync: Fix potential hang when initializing remote dsync The initial dsync handshake TCP packet could be in the same packet as the previous doveadm command. This started happening more often with the recent multiplex ostream corking changes in f284865285ae461b293c713e03277cfbb6973eca --- diff --git a/src/doveadm/dsync/dsync-ibc-stream.c b/src/doveadm/dsync/dsync-ibc-stream.c index 0ed63b7dfe..e27b325977 100644 --- a/src/doveadm/dsync/dsync-ibc-stream.c +++ b/src/doveadm/dsync/dsync-ibc-stream.c @@ -324,6 +324,7 @@ static void dsync_ibc_stream_init(struct dsync_ibc_stream *ibc) unsigned int i; ibc->io = io_add_istream(ibc->input, dsync_ibc_stream_input, ibc); + io_set_pending(ibc->io); o_stream_set_no_error_handling(ibc->output, TRUE); o_stream_set_flush_callback(ibc->output, dsync_ibc_stream_output, ibc); ibc->to = timeout_add(ibc->timeout_secs * 1000,