ApiListener: Reorder logging in `ApiTimerHandler()`

This commit is contained in:
Yonas Habteab 2024-02-21 12:18:35 +01:00
parent e062ceb901
commit 9f84c1516e
1 changed files with 4 additions and 4 deletions

View File

@ -1021,6 +1021,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 {
@ -1033,10 +1037,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);
}
}