Fix update execution

This commit is contained in:
Mattia Codato 2020-07-31 14:07:48 +02:00
parent 604b938ade
commit cf1430c409
2 changed files with 4 additions and 4 deletions

View File

@ -88,9 +88,9 @@ static void SendEventExecuteCommand(const Dictionary::Ptr& params, long exitStat
executedParams->Set("start", start);
executedParams->Set("end", end);
ClusterEvents::ExecutedCommandAPIHandler(origin, executedParams);
if (!origin->IsLocal()) {
if (origin->IsLocal()) {
ClusterEvents::ExecutedCommandAPIHandler(origin, executedParams);
} else {
Dictionary::Ptr executedMessage = new Dictionary();
executedMessage->Set("jsonrpc", "2.0");
executedMessage->Set("method", "event::ExecutedCommand");

View File

@ -1038,7 +1038,7 @@ Value ClusterEvents::ExecutedCommandAPIHandler(const MessageOrigin::Ptr& origin,
updateMessage->Set("method", "event::UpdateExecutions");
updateMessage->Set("params", updateParams);
listener->RelayMessage(origin, checkable, updateMessage, true);
listener->RelayMessage(nullptr, checkable, updateMessage, true);
return Empty;
}