added queue lock for receiveMessage

This commit is contained in:
Robin Müller 2020-06-07 16:12:23 +02:00
parent 98e6ca5f78
commit 3b4413a6ee

View File

@ -61,6 +61,7 @@ ReturnValue_t MessageQueue::receiveMessage(MessageQueueMessage* message) {
}
// not sure this will work..
//*message = std::move(messageQueue.front());
MutexHelper mutexLock(queueLock, 20);
MessageQueueMessage* currentMessage = &messageQueue.front();
std::copy(currentMessage->getBuffer(),
currentMessage->getBuffer() + messageSize, message->getBuffer());