for (resp = ISC_LIST_HEAD(fctx->resps); resp != NULL; resp = next) {
next = ISC_LIST_NEXT(resp, link);
ISC_LIST_UNLINK(fctx->resps, resp, link);
+
+ /*
+ * Only the regular fetch events should be counted for the
+ * clients-per-query limit, in case if there are multiple events
+ * registered for a single client.
+ */
+ if (resp->type == FETCHDONE) {
+ count++;
+ }
+
if (resp->type == TRYSTALE) {
/*
* Not applicable to TRYSTALE resps; this function is
FCTXTRACE("post response event");
isc_async_run(resp->loop, resp->cb, resp);
- count++;
}
UNLOCK(&fctx->lock);
result = DNS_R_DUPLICATE;
goto unlock;
}
- count++;
+
+ /*
+ * Only the regular fetch events should be
+ * counted for the clients-per-query limit, in
+ * case if there are multiple events registered
+ * for a single client.
+ */
+ if (resp->type == FETCHDONE) {
+ count++;
+ }
}
}
if (count >= spillatmin && spillatmin != 0) {