Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions src/rpc/RpcBase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,6 @@ void RpcBase::processReceivedData(const void* data, size_t size)
{
// Decode received data
std::string received_data(reinterpret_cast<const char*>(data), size);
for (ISpy* spy : m_spies)
{
spy->rcpMessageReceived(received_data);
}

// RPC frame must be a JSON array
bool valid = false;
Expand All @@ -315,6 +311,10 @@ void RpcBase::processReceivedData(const void* data, size_t size)
}
if (valid && rpc_frame.IsArray() && (rpc_frame.Size() >= 3))
{
for (ISpy* spy : m_spies)
{
spy->rcpMessageReceived(received_data);
}
// Extract message type
const rapidjson::Value& msg_type_value = rpc_frame[0];
if (msg_type_value.IsUint())
Expand Down