avoid race condition

This commit is contained in:
orignal 2014-06-26 15:41:12 -04:00
parent acbe0d801d
commit 9ad76aa0cf
2 changed files with 4 additions and 1 deletions

View file

@ -48,6 +48,7 @@ namespace tunnel
TunnelMessageBlock block;
block.deliveryType = eDeliveryTypeLocal;
block.data = msg;
std::unique_lock<std::mutex> l(m_SendMutex);
m_Gateway.SendTunnelDataMsg (block);
}
@ -81,4 +82,4 @@ namespace tunnel
}
}
}
}
}