Skip to content

Commit

Permalink
ApiListener: Reorder logging in ApiTimerHandler()
Browse files Browse the repository at this point in the history
  • Loading branch information
yhabteab authored and Al2Klimov committed Sep 3, 2024
1 parent b9b3e7a commit 96839d8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions lib/remote/apilistener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand All @@ -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);
}
}

Expand Down

0 comments on commit 96839d8

Please sign in to comment.