mirror of
https://gitlab.isc.org/isc-projects/bind9
synced 2025-08-30 22:15:20 +00:00
Limit the number of requests sent per connection in DoH tests
This commit ensures that only a limited number of requests is going to be sent over a single HTTP/2 connection. Before that change was introduced, it was possible to complete all of the planned sends via only one transport connection, which undermines the purpose of the tests using the quota facility.
This commit is contained in:
@@ -725,7 +725,7 @@ doh_receive_send_reply_cb(isc_nmhandle_t *handle, isc_result_t eresult,
|
|||||||
int_fast64_t sends = atomic_fetch_sub(&nsends, 1);
|
int_fast64_t sends = atomic_fetch_sub(&nsends, 1);
|
||||||
atomic_fetch_add(&csends, 1);
|
atomic_fetch_add(&csends, 1);
|
||||||
atomic_fetch_add(&creads, 1);
|
atomic_fetch_add(&creads, 1);
|
||||||
if (sends > 0) {
|
if (sends > 0 && cbarg == NULL) {
|
||||||
size_t i;
|
size_t i;
|
||||||
for (i = 0; i < NWRITES / 2; i++) {
|
for (i = 0; i < NWRITES / 2; i++) {
|
||||||
eresult = isc__nm_http_request(
|
eresult = isc__nm_http_request(
|
||||||
@@ -733,7 +733,7 @@ doh_receive_send_reply_cb(isc_nmhandle_t *handle, isc_result_t eresult,
|
|||||||
&(isc_region_t){
|
&(isc_region_t){
|
||||||
.base = (uint8_t *)send_msg.base,
|
.base = (uint8_t *)send_msg.base,
|
||||||
.length = send_msg.len },
|
.length = send_msg.len },
|
||||||
doh_receive_send_reply_cb, cbarg);
|
doh_receive_send_reply_cb, (void *)1);
|
||||||
if (eresult == ISC_R_CANCELED) {
|
if (eresult == ISC_R_CANCELED) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user