mirror of
https://github.com/isc-projects/bind9.git
synced 2026-05-28 04:34:54 -04:00
Fix the doh_recv_send() logic in the doh_test
The commit fixes the doh_recv_send() because occasionally it would fail because it did not wait for all responses to be sent, making the check for ssends value to nit pass.
This commit is contained in:
parent
e639957b58
commit
d72b1fa5cd
1 changed files with 8 additions and 0 deletions
|
|
@ -1075,6 +1075,14 @@ doh_recv_send(void **state) {
|
|||
isc_thread_create(doh_connect_thread, connect_nm, &threads[i]);
|
||||
}
|
||||
|
||||
/* wait for the all responses from the server */
|
||||
while (atomic_load(&ssends) < atomic_load(&total_sends)) {
|
||||
if (atomic_load(&was_error)) {
|
||||
break;
|
||||
}
|
||||
isc_test_nap(100);
|
||||
}
|
||||
|
||||
for (size_t i = 0; i < nthreads; i++) {
|
||||
isc_thread_join(threads[i], NULL);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue