From: Remi Gacogne Date: Mon, 22 Jun 2020 13:07:08 +0000 (+0200) Subject: rec: Better exception handling in houseKeeping X-Git-Tag: dnsdist-1.5.0-rc4~12^2~1 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0ac327bc7aefda08d08b247fa1d7da434ed94d42;p=thirdparty%2Fpdns.git rec: Better exception handling in houseKeeping An uncaugth exception being raised in houseKeeping could prevent it from being run again because 's_running' would stay true. That could for example happen when an ImmediateServFailException was raised during a call to primeRootNSZones(). --- diff --git a/pdns/pdns_recursor.cc b/pdns/pdns_recursor.cc index cd336817df..a13434dcfc 100644 --- a/pdns/pdns_recursor.cc +++ b/pdns/pdns_recursor.cc @@ -3187,7 +3187,25 @@ static void houseKeeping(void *) int res = SyncRes::getRootNS(g_now, nullptr, 0); if (!res) { last_rootupdate=now.tv_sec; - primeRootNSZones(g_dnssecmode != DNSSECMode::Off, 0); + try { + primeRootNSZones(g_dnssecmode != DNSSECMode::Off, 0); + } + catch (const std::exception& e) { + g_log<