From 0529d51a85b8764d05ea13535aa0057c08406a0d Mon Sep 17 00:00:00 2001 From: Michael Friedrich Date: Wed, 30 Sep 2015 16:14:04 +0200 Subject: [PATCH] Config sync does not set endpoint syncing and plays disconnect-sync ping-pong fixes #10255 --- lib/remote/apilistener.cpp | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index b8b879dbd..c14abacc7 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -375,11 +375,6 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri if (endpoint) { endpoint->AddClient(aclient); - /* sync zone file config */ - SendConfigUpdate(aclient); - /* sync runtime config */ - SendRuntimeConfigObjects(aclient); - if (need_sync) { { ObjectLock olock(endpoint); @@ -387,6 +382,17 @@ void ApiListener::NewClientHandlerInternal(const Socket::Ptr& client, const Stri endpoint->SetSyncing(true); } + Log(LogInformation, "ApiListener") + << "Sending updates for endpoint '" << endpoint->GetName() << "'."; + + /* sync zone file config */ + SendConfigUpdate(aclient); + /* sync runtime config */ + SendRuntimeConfigObjects(aclient); + + Log(LogInformation, "ApiListener") + << "Finished sending updates for endpoint '" << endpoint->GetName() << "'."; + ReplayLog(aclient); } } else -- 2.40.0