mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:44:02 +02:00
changed writelock to readlock
plus a coding standard fix
This commit is contained in:
parent
ff2a5342ee
commit
e45f2fed4b
2 changed files with 4 additions and 2 deletions
|
@ -37,6 +37,8 @@ const QByteArray* SentPacketHistory::getPacket(OCTREE_PACKET_SEQUENCE sequenceNu
|
|||
return NULL;
|
||||
}
|
||||
int packetAt = _newestPacketAt - seqDiff;
|
||||
if (packetAt < 0) { packetAt += _sentPackets.size(); }
|
||||
if (packetAt < 0) {
|
||||
packetAt += _sentPackets.size();
|
||||
}
|
||||
return &_sentPackets.at(packetAt);
|
||||
}
|
||||
|
|
|
@ -2123,7 +2123,7 @@ void Application::sendNack() {
|
|||
|
||||
QUuid nodeUUID = node->getUUID();
|
||||
|
||||
_octreeSceneStatsLock.lockForWrite();
|
||||
_octreeSceneStatsLock.lockForRead();
|
||||
|
||||
// retreive octree scene stats of this node
|
||||
if (_octreeServerSceneStats.find(nodeUUID) == _octreeServerSceneStats.end()) {
|
||||
|
|
Loading…
Reference in a new issue