doh_test: change slowdown logic so that it will not stuck

There is a slight chance that active_cconnects could exceed the number
of workers, making the unit test stuck.
This commit is contained in:
Artem Boldariev
2022-10-14 21:44:47 +03:00
parent 778cf872eb
commit 001b78cd43
+1
View File
@@ -725,6 +725,7 @@ doh_connect_thread(void *arg) {
*/
int_fast64_t active = atomic_fetch_add(&active_cconnects, 1);
if (active > workers) {
(void)atomic_fetch_sub(&active_cconnects, 1);
goto next;
}
connect_send_request(connect_nm, req_url, atomic_load(&POST),