]> git.ipfire.org Git - thirdparty/dovecot/core.git/commitdiff
lib-http: test-http-payload - Clean up global http client context between tests.
authorStephan Bosch <stephan.bosch@open-xchange.com>
Thu, 26 Jan 2023 01:41:05 +0000 (02:41 +0100)
committeraki.tuomi <aki.tuomi@open-xchange.com>
Mon, 30 Jan 2023 19:48:46 +0000 (19:48 +0000)
src/lib-http/test-http-payload.c

index e60d6b6857ad52b84fe3dbd891d51a560b22b483..8600b2727eb3b3b1c48bd94633aa10f24dab09d7 100644 (file)
@@ -1008,6 +1008,8 @@ static void test_client_deinit(void)
 
        timeout_remove(&to_continue);
        timeout_remove(&to_client_progress);
+
+       http_client_global_context_free();
 }
 
 static void
@@ -1028,7 +1030,7 @@ test_client_create_clients(const struct http_client_settings *client_set)
                                   http_client_init_shared(http_context, NULL));
        }
 
-       if (!tset.parallel_clients_global)
+       if (http_context != NULL)
                http_client_context_unref(&http_context);
 }