]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-payload: Fixed problem in nested ioloop test.
authorStephan Bosch <stephan@dovecot.fi>
Sun, 11 Sep 2016 20:10:44 +0000 (22:10 +0200)
committerStephan Bosch <stephan@dovecot.fi>
Tue, 13 Sep 2016 21:15:27 +0000 (23:15 +0200)
The running ioloop was not always stopped properly at the end of the test.
This caused an assert failure in the running ioloop.

src/lib-http/test-http-payload.c

index 62ebdc4f51956ee1a911a33030ffaf921d8750e6..88de427b70ffc6e72ee1da3ccb11d0b1761be637 100644 (file)
@@ -1159,6 +1159,11 @@ static void test_client_echo_continue(void)
                                ioloop_nested_first, ioloop_nested_last, ioloop_nested_depth);
                }
                ioloop_nested_first = ioloop_nested_last = 0;
+
+               if (client_files_first >= count) {
+                       io_loop_stop(current_ioloop);
+                       return;
+               }
        }
 }