From: Miod Vallat Date: Sat, 30 May 2026 20:57:49 +0000 (+0200) Subject: Merge pull request #17355 from miodvallat/porcupine_tree X-Git-Tag: auth-5.1.0~6 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=d0305a164fbb4514d71a31cfb2aebc4b18bf714d;p=thirdparty%2Fpdns.git Merge pull request #17355 from miodvallat/porcupine_tree auth: skip zone cache refresh logic if disabled --- d0305a164fbb4514d71a31cfb2aebc4b18bf714d diff --cc pdns/auth-main.cc index 19881f48fd,925d917b71..aa0d18e936 --- a/pdns/auth-main.cc +++ b/pdns/auth-main.cc @@@ -975,21 -986,11 +995,12 @@@ static void mainthread( UeberBackend::go(); // Setup the zone cache + g_zoneCache.setSLog(slog); g_zoneCache.setRefreshInterval(::arg().asNum("zone-cache-refresh-interval")); - try { - UeberBackend B; - B.updateZoneCache(); - } - catch (PDNSException& e) { - SLOG(g_log << Logger::Error << "PDNSException while filling the zone cache: " << e.reason << endl, - slog->error(Logr::Error, e.reason, "PDNSException while filling the zone cache")); - exit(1); - } - catch (std::exception& e) { - SLOG(g_log << Logger::Error << "STL Exception while filling the zone cache: " << e.what() << endl, - slog->error(Logr::Error, e.what(), "STL Exception while filling the zone cache")); - exit(1); + if (g_zoneCache.getRefreshInterval() != 0) { + if (!updateZoneCache(slog)) { + exit(1); // NOLINT(concurrency-mt-unsafe) we're single threaded at this point + } } // NOW SAFE TO CREATE THREADS!