fixed race condition

This commit is contained in:
orignal 2014-08-30 16:30:53 -04:00
parent 17725acda2
commit ccbc4353d6
2 changed files with 8 additions and 2 deletions

View file

@ -690,6 +690,11 @@ namespace ssu
}
void SSUSession::SendI2NPMessage (I2NPMessage * msg)
{
m_Server.GetService ().post (boost::bind (&SSUSession::PostI2NPMessage, this, msg));
}
void SSUSession::PostI2NPMessage (I2NPMessage * msg)
{
if (msg)
{
@ -698,8 +703,8 @@ namespace ssu
else
m_DelayedMessages.push_back (msg);
}
}
}
void SSUSession::ProcessData (uint8_t * buf, size_t len)
{
m_Data.ProcessMessage (buf, len);