mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 13:49:46 +02:00
added write lock/unlock
...for _octreeSceneStatsLock
This commit is contained in:
parent
5c47485562
commit
bd2148d4b7
1 changed files with 4 additions and 0 deletions
|
@ -2120,6 +2120,8 @@ void Application::sendNack() {
|
|||
|| node->getType() == NodeType::ModelServer)
|
||||
) {
|
||||
|
||||
_octreeSceneStatsLock.lockForWrite();
|
||||
|
||||
OctreeSceneStats& stats = _octreeServerSceneStats[node->getUUID()];
|
||||
|
||||
char* dataAt = packet;
|
||||
|
@ -2146,6 +2148,8 @@ void Application::sendNack() {
|
|||
dataAt += sizeof(OCTREE_PACKET_SEQUENCE);
|
||||
}
|
||||
|
||||
_octreeSceneStatsLock.unlock();
|
||||
|
||||
// make sure we still have an active socket????
|
||||
nodeList->writeUnverifiedDatagram(packet, dataAt - packet, node);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue