]> git.ipfire.org Git - thirdparty/bind9.git/commitdiff
DoH unit test: do not increase 'active_cconnects' too much
authorArtem Boldariev <artem@boldariev.com>
Mon, 27 Nov 2023 21:10:36 +0000 (23:10 +0200)
committerArtem Boldariev <artem@boldariev.com>
Wed, 6 Dec 2023 13:15:25 +0000 (15:15 +0200)
Theoretically, the value could get too big, not letting the test to
finish. This commit fixes that omission.

tests/isc/doh_test.c

index ad083f1e7009c924ff9148590aaaf5a01a265476..1da62f1d605a8914959712260ed0f21d621fb42a 100644 (file)
@@ -773,6 +773,7 @@ doh_connect_thread(void *arg) {
         */
        int_fast64_t active = atomic_fetch_add(&active_cconnects, 1);
        if (active > workers) {
+               atomic_fetch_sub(&active_cconnects, 1);
                return;
        }
        connect_send_request(connect_nm, req_url, atomic_load(&POST),