MCPcopy Create free account
hub / github.com/ElementsProject/lightning / dns_pump_queue

Function dns_pump_queue

connectd/dns.c:207–216  ·  view source on GitHub ↗

Start queued lookups while we have child slots free. A failed start * finishes its lookup (with an error, via callback) without ever taking a * slot, so the loop simply moves on to the next one. */

Source from the content-addressed store, hash-verified

205 * finishes its lookup (with an error, via callback) without ever taking a
206 * slot, so the loop simply moves on to the next one. */
207static void dns_pump_queue(void)
208{
209 while (dns_num_active < DNS_MAX_CONCURRENT_LOOKUPS
210 && !list_empty(&dns_queue)) {
211 struct dns_lookup *lookup
212 = list_pop(&dns_queue, struct dns_lookup, list);
213 lookup->queued = false;
214 dns_start(lookup);
215 }
216}
217
218/*~ Parsing the child's output: strictly, and fail-closed on anything
219 * unexpected. */

Callers 1

dns_finishFunction · 0.85

Calls 1

dns_startFunction · 0.85

Tested by

no test coverage detected