mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 05:58:27 +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)
|
|| node->getType() == NodeType::ModelServer)
|
||||||
) {
|
) {
|
||||||
|
|
||||||
|
_octreeSceneStatsLock.lockForWrite();
|
||||||
|
|
||||||
OctreeSceneStats& stats = _octreeServerSceneStats[node->getUUID()];
|
OctreeSceneStats& stats = _octreeServerSceneStats[node->getUUID()];
|
||||||
|
|
||||||
char* dataAt = packet;
|
char* dataAt = packet;
|
||||||
|
@ -2146,6 +2148,8 @@ void Application::sendNack() {
|
||||||
dataAt += sizeof(OCTREE_PACKET_SEQUENCE);
|
dataAt += sizeof(OCTREE_PACKET_SEQUENCE);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_octreeSceneStatsLock.unlock();
|
||||||
|
|
||||||
// make sure we still have an active socket????
|
// make sure we still have an active socket????
|
||||||
nodeList->writeUnverifiedDatagram(packet, dataAt - packet, node);
|
nodeList->writeUnverifiedDatagram(packet, dataAt - packet, node);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue