diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 349d178a238..a09bfa4d425 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -923,7 +923,7 @@ void ApiListener::SyncClient(const JsonRpcConnection::Ptr& aclient, const Endpoi Log(LogInformation, "ApiListener") << "Finished sending runtime config updates for endpoint '" << endpoint->GetName() << "' in zone '" << eZone->GetName() << "'."; - if (!needSync) { + if (!needSync || aclient->IsShuttingDown()) { ObjectLock olock2(endpoint); endpoint->SetSyncing(false); return;