Skip to content

Commit

Permalink
Update message_event.cpp
Browse files Browse the repository at this point in the history
bug fixs.
  • Loading branch information
lynncui00 committed Nov 9, 2016
1 parent c2567af commit f851064
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/communicate/tcp/message_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const bool MessageEvent :: IsActive()
int MessageEvent :: AddMessage(const std::string & sMessage)
{
m_llLastActiveTime = Time::GetSteadyClockMS();
std::lock_guard<std::mutex> oLockGuard(m_oMutex);
std::unique_lock<std::mutex> oLock(m_oMutex);

if ((int)m_oInQueue.size() > TCP_QUEUE_MAXLEN)
{
Expand All @@ -116,7 +116,7 @@ int MessageEvent :: AddMessage(const std::string & sMessage)

m_iQueueMemSize += sMessage.size();

m_oMutex.unlock();
oLock.unlock();

JumpoutEpollWait();

Expand Down

0 comments on commit f851064

Please sign in to comment.