From: Fred Morcos Date: Wed, 3 Aug 2022 11:34:01 +0000 (+0200) Subject: Cleanup X-Git-Tag: rec-4.8.0-alpha1~40^2 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=a34586cffe40d3cd653bff6ef30e64ddf982409d;p=thirdparty%2Fpdns.git Cleanup --- diff --git a/pdns/recursordist/rec-main.cc b/pdns/recursordist/rec-main.cc index c248fcfc8b..40f4af10d4 100644 --- a/pdns/recursordist/rec-main.cc +++ b/pdns/recursordist/rec-main.cc @@ -2955,16 +2955,15 @@ static RecursorControlChannel::Answer* doReloadLuaScript() g_log << Logger::Info << RecThreadInfo::id() << " Unloaded current lua script" << endl; return new RecursorControlChannel::Answer{0, string("unloaded\n")}; } - else { - t_pdl = std::make_shared(); - try { - t_pdl->loadFile(fname); - } - catch (std::runtime_error& ex) { - string msg = std::to_string(RecThreadInfo::id()) + " Retaining current script, could not read '" + fname + "': " + ex.what(); - g_log << Logger::Error << msg << endl; - return new RecursorControlChannel::Answer{1, msg + "\n"}; - } + + t_pdl = std::make_shared(); + try { + t_pdl->loadFile(fname); + } + catch (std::runtime_error& ex) { + string msg = std::to_string(RecThreadInfo::id()) + " Retaining current script, could not read '" + fname + "': " + ex.what(); + g_log << Logger::Error << msg << endl; + return new RecursorControlChannel::Answer{1, msg + "\n"}; } } catch (std::exception& e) {