From a65da20c97c5d71dcdf9c187a47c86ec78272ad3 Mon Sep 17 00:00:00 2001 From: Chris Hofstaedtler Date: Thu, 29 Oct 2020 12:54:43 +0100 Subject: [PATCH] Avoid abort if database server goes away --- pdns/common_startup.cc | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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<