]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
dsync: Fix potential hang when initializing remote dsync
authorTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 20 Oct 2019 10:48:22 +0000 (13:48 +0300)
committerTimo Sirainen <timo.sirainen@open-xchange.com>
Sun, 20 Oct 2019 10:48:22 +0000 (13:48 +0300)
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

src/doveadm/dsync/dsync-ibc-stream.c

index 0ed63b7dfe0444d3db331d53f49701a841f479d2..e27b325977357cadde71576dc4a5d3b78dd5bb14 100644 (file)
@@ -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,