diff --git a/modules/s_dns.cc b/modules/s_dns.cc index 7f568c2ff..015976b3f 100644 --- a/modules/s_dns.cc +++ b/modules/s_dns.cc @@ -801,7 +801,7 @@ ircd::net::dns::cache::call_waiters(const string_view &type, const json::array &rrs) { auto it(begin(waiting)); - while(it != end(waiting)) try + while(it != end(waiting)) { auto &waiter(*it); if(call_waiter(type, state_key, rrs, waiter)) @@ -809,14 +809,6 @@ ircd::net::dns::cache::call_waiters(const string_view &type, else ++it; } - catch(const std::exception &e) - { - ++it; - log::error - { - log, "proffer :%s", e.what() - }; - } } bool @@ -824,6 +816,7 @@ ircd::net::dns::cache::call_waiter(const string_view &type, const string_view &state_key, const json::array &rrs, waiter &waiter) +try { if(state_key != waiter.key) return false; @@ -844,6 +837,19 @@ ircd::net::dns::cache::call_waiter(const string_view &type, waiter.callback(target, rrs); return true; } +catch(const std::exception &e) +{ + log::critical + { + log, "callback:%p %s,%s :%s", + (const void *)&waiter, + type, + state_key, + e.what(), + }; + + return true; +} // // cache room creation