Use RelayMessage instead of SyncSendMessage

This commit is contained in:
Mattia Codato 2020-06-29 09:28:02 +02:00
parent da82c17891
commit 3f1b51b355

View File

@ -682,7 +682,7 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
updateMessage->Set("params", updateParams); updateMessage->Set("params", updateParams);
MessageOrigin::Ptr origin = new MessageOrigin(); MessageOrigin::Ptr origin = new MessageOrigin();
listener->SyncSendMessage(endpointPtr, updateMessage); listener->RelayMessage(origin, checkable, updateMessage, true);
/* Execute command */ /* Execute command */
Dictionary::Ptr execMessage = new Dictionary(); Dictionary::Ptr execMessage = new Dictionary();
@ -708,7 +708,7 @@ Dictionary::Ptr ApiActions::ExecuteCommand(const ConfigObject::Ptr& object,
execParams->Set("source", uuid); execParams->Set("source", uuid);
execParams->Set("deadline", deadline); execParams->Set("deadline", deadline);
listener->SyncSendMessage(endpointPtr, execMessage); listener->RelayMessage(origin, checkable, execMessage, true);
} }
Dictionary::Ptr result = new Dictionary(); Dictionary::Ptr result = new Dictionary();