Remove unuseful variable. Fix log

This commit is contained in:
Mattia Codato 2020-07-14 11:57:12 +02:00
parent 59dfe6ad41
commit 26685a9360
1 changed files with 3 additions and 8 deletions

View File

@ -93,16 +93,12 @@ void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, cons
ApiListener::Ptr listener = ApiListener::GetInstance();
if (!listener) {
Log(LogCritical, "ApiListener", "No instance available.");
Log(LogCritical, "ApiListener") << "No instance available.";
return;
}
bool executeCommandProcessFinishedHandlerToBeReset = false;
Defer resetExecuteCommandProcessFinishedHandler ([&executeCommandProcessFinishedHandlerToBeReset]() {
if (executeCommandProcessFinishedHandlerToBeReset) {
Checkable::ExecuteCommandProcessFinishedHandler = nullptr;
executeCommandProcessFinishedHandlerToBeReset = false;
}
Defer resetExecuteCommandProcessFinishedHandler ([]() {
Checkable::ExecuteCommandProcessFinishedHandler = nullptr;
});
if (params->Contains("source")) {
@ -184,7 +180,6 @@ void ClusterEvents::ExecuteCheckFromQueue(const MessageOrigin::Ptr& origin, cons
listener->SyncSendMessage(sourceEndpoint, executedMessage);
}
};
executeCommandProcessFinishedHandlerToBeReset = true;
}
if (!listener->GetAcceptCommands()) {