diff --git a/src/WhisperCom/Service.cpp b/src/WhisperCom/Service.cpp index 8fd2b6c..a8f7c2f 100644 --- a/src/WhisperCom/Service.cpp +++ b/src/WhisperCom/Service.cpp @@ -166,9 +166,8 @@ void WhisperCom::Service::processMessage_(const zmq::message_t &msg) WhisperCom::Protobuf::Message wMsg{}; wMsg = rmsg.msg(); std::unique_lock lk(mutexMessageQueue_); - mutexMessageQueue_.lock(); messageQueue_.push(std::make_shared(wMsg)); - mutexMessageQueue_.unlock(); + lk.unlock(); condWaitMessageQueue_.notify_one(); DLOG_S(INFO) << "received data message"; }