]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib: test-multiplex - Make sure alt istream's final input is read
authorTimo Sirainen <timo.sirainen@dovecot.fi>
Wed, 23 May 2018 21:40:41 +0000 (00:40 +0300)
committerAki Tuomi <aki.tuomi@open-xchange.com>
Thu, 24 May 2018 09:15:16 +0000 (09:15 +0000)
Previously the code trusted that the the alt istream's final IO callback was
called even after io_loop_stop().

src/lib/test-multiplex.c

index 77582d865d84e867dd9b0e7ad92469621e304e2d..6e3927d2be7f4be56376ebe709984af198d60c97 100644 (file)
@@ -95,6 +95,7 @@ static void setup_channel(struct test_channel *channel,
 
 static void teardown_channel(struct test_channel *channel)
 {
+       test_istream_read_alt(channel);
        test_assert(memcmp(channel->received->data,
                           channel->received_alt->data,
                           channel->received->used) == 0);