From 0c35ab32df2a72a485704be0cda1c150b9073e24 Mon Sep 17 00:00:00 2001 From: Andy Green Date: Wed, 22 Jan 2020 08:55:24 +0000 Subject: [PATCH] COV265479: asyn dns check retrun from retry api Actually we are scheduling the first retry in case nothing comes back from the server, it won't fail since it will allow at least one retry, this being udp. --- lib/system/async-dns/async-dns.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/system/async-dns/async-dns.c b/lib/system/async-dns/async-dns.c index 93bd8708f..81c34e0b9 100644 --- a/lib/system/async-dns/async-dns.c +++ b/lib/system/async-dns/async-dns.c @@ -716,8 +716,9 @@ lws_async_dns_query(struct lws_context *context, int tsi, const char *name, q->standalone_cb = cb; /* schedule a retry according to the retry policy on the wsi */ - lws_retry_sul_schedule_retry_wsi(dns->wsi, &q->sul, - lws_async_dns_sul_cb_retry, &q->retry); + if (lws_retry_sul_schedule_retry_wsi(dns->wsi, &q->sul, + lws_async_dns_sul_cb_retry, &q->retry)) + goto failed; /* * We may rewrite the copy at +sizeof(*q) for CNAME recursion. Keep