diff --git a/lib/remote/apilistener.cpp b/lib/remote/apilistener.cpp index 2162c2120..b689bf7a3 100644 --- a/lib/remote/apilistener.cpp +++ b/lib/remote/apilistener.cpp @@ -1020,6 +1020,10 @@ void ApiListener::ApiTimerHandler() maxTs = client->GetTimestamp(); } + Log(LogNotice, "ApiListener") + << "Setting log position for identity '" << endpoint->GetName() << "': " + << Utility::FormatDateTime("%Y/%m/%d %H:%M:%S", ts); + for (const JsonRpcConnection::Ptr& client : endpoint->GetClients()) { if (client->GetTimestamp() == maxTs) { try { @@ -1032,10 +1036,6 @@ void ApiListener::ApiTimerHandler() client->Disconnect(); } } - - Log(LogNotice, "ApiListener") - << "Setting log position for identity '" << endpoint->GetName() << "': " - << Utility::FormatDateTime("%Y/%m/%d %H:%M:%S", ts); } }