From: Chris Hofstaedtler Date: Thu, 29 Oct 2020 11:54:43 +0000 (+0100) Subject: Avoid abort if database server goes away X-Git-Tag: auth-4.5.0-alpha1~7^2~23 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a65da20c97c5d71dcdf9c187a47c86ec78272ad3;p=thirdparty%2Fpdns.git Avoid abort if database server goes away --- diff --git a/pdns/common_startup.cc b/pdns/common_startup.cc index 111a75a39c..82ca91a4ff 100644 --- a/pdns/common_startup.cc +++ b/pdns/common_startup.cc @@ -687,9 +687,17 @@ void mainthread() domainCacheUpdateSince += slept; if (domainCacheUpdateSince >= g_domainCache.getTTL()) { - domainCacheUpdateSince = 0; - UeberBackend B; - B.updateDomainCache(); + try { + UeberBackend B; + B.updateDomainCache(); + domainCacheUpdateSince = 0; + } + catch(PDNSException &e) { + g_log<