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:
@@ -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),
|
||||
|
||||
Reference in New Issue
Block a user