FIX: fixed deadlock in messagequeue
This commit is contained in:
parent
df04dcee00
commit
f69010a6e6
@ -166,9 +166,8 @@ void WhisperCom::Service::processMessage_(const zmq::message_t &msg)
|
|||||||
WhisperCom::Protobuf::Message wMsg{};
|
WhisperCom::Protobuf::Message wMsg{};
|
||||||
wMsg = rmsg.msg();
|
wMsg = rmsg.msg();
|
||||||
std::unique_lock lk(mutexMessageQueue_);
|
std::unique_lock lk(mutexMessageQueue_);
|
||||||
mutexMessageQueue_.lock();
|
|
||||||
messageQueue_.push(std::make_shared<WhisperCom::Protobuf::Message>(wMsg));
|
messageQueue_.push(std::make_shared<WhisperCom::Protobuf::Message>(wMsg));
|
||||||
mutexMessageQueue_.unlock();
|
lk.unlock();
|
||||||
condWaitMessageQueue_.notify_one();
|
condWaitMessageQueue_.notify_one();
|
||||||
DLOG_S(INFO) << "received data message";
|
DLOG_S(INFO) << "received data message";
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user