From ce7b8395d0091af1b654d01c0ac21913907d8820 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?louiz=E2=80=99?= Date: Mon, 29 Jul 2019 23:14:47 +0200 Subject: Add an error message on DNS resolution failure for IPv6 only --- src/network/resolver.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src') diff --git a/src/network/resolver.cpp b/src/network/resolver.cpp index ef54ba2..42d6969 100644 --- a/src/network/resolver.cpp +++ b/src/network/resolver.cpp @@ -213,6 +213,12 @@ void Resolver::on_hostname6_resolved(dns_rr_a6 *result) this->call_getaddrinfo(buf, this->port.data(), AI_NUMERICHOST); } } + else + { + const auto error = dns_error_messages.find(status); + if (error != end(dns_error_messages)) + this->error_msg = error->second; + } } void Resolver::after_resolved() -- cgit v1.2.3