From fbfa931b31d664e02a03a6f14730c3db8e0cb5b4 Mon Sep 17 00:00:00 2001 From: "Alexander A. Klimov" Date: Fri, 11 Sep 2020 13:38:35 +0200 Subject: [PATCH] Clear ApiListener#last_failed_zones_stage_validation on config::Update if config not changed refs #7642 --- lib/remote/apilistener-filesync.cpp | 3 ++- lib/remote/apilistener.hpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/remote/apilistener-filesync.cpp b/lib/remote/apilistener-filesync.cpp index 468c0038f..738dad79c 100644 --- a/lib/remote/apilistener-filesync.cpp +++ b/lib/remote/apilistener-filesync.cpp @@ -314,7 +314,7 @@ Value ApiListener::ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const D std::thread([origin, params, listener]() { try { - HandleConfigUpdate(origin, params); + listener->HandleConfigUpdate(origin, params); } catch (const std::exception& ex) { auto msg ("Exception during config sync: " + DiagnosticInformation(ex)); @@ -543,6 +543,7 @@ void ApiListener::HandleConfigUpdate(const MessageOrigin::Ptr& origin, const Dic Log(LogInformation, "ApiListener") << "Received configuration updates (" << count << ") from endpoint '" << fromEndpointName << "' are equal to production, skipping validation and reload."; + ClearLastFailedZonesStageValidation(); } } diff --git a/lib/remote/apilistener.hpp b/lib/remote/apilistener.hpp index 4a3623a68..d3ed17d23 100644 --- a/lib/remote/apilistener.hpp +++ b/lib/remote/apilistener.hpp @@ -85,7 +85,7 @@ public: /* filesync */ static Value ConfigUpdateHandler(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params); - static void HandleConfigUpdate(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params); + void HandleConfigUpdate(const MessageOrigin::Ptr& origin, const Dictionary::Ptr& params); /* configsync */ static void ConfigUpdateObjectHandler(const ConfigObject::Ptr& object, const Value& cookie);