mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 18:23:54 +02:00
Add missing read locks to LimitedNodeList's hash
This commit is contained in:
parent
d78eb19e44
commit
70cf25bd8b
2 changed files with 3 additions and 2 deletions
|
@ -522,6 +522,7 @@ SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t
|
|||
const HifiSockAddr& publicSocket, const HifiSockAddr& localSocket,
|
||||
const NodePermissions& permissions,
|
||||
const QUuid& connectionSecret) {
|
||||
QReadLocker readLocker(&_nodeMutex);
|
||||
NodeHash::const_iterator it = _nodeHash.find(uuid);
|
||||
|
||||
if (it != _nodeHash.end()) {
|
||||
|
|
|
@ -131,7 +131,7 @@ public:
|
|||
|
||||
std::function<void(Node*)> linkedDataCreateCallback;
|
||||
|
||||
size_t size() const { return _nodeHash.size(); }
|
||||
size_t size() const { QReadLocker readLock(&_nodeMutex); return _nodeHash.size(); }
|
||||
|
||||
SharedNodePointer nodeWithUUID(const QUuid& nodeUUID);
|
||||
|
||||
|
@ -287,7 +287,7 @@ protected:
|
|||
|
||||
QUuid _sessionUUID;
|
||||
NodeHash _nodeHash;
|
||||
QReadWriteLock _nodeMutex;
|
||||
mutable QReadWriteLock _nodeMutex;
|
||||
udt::Socket _nodeSocket;
|
||||
QUdpSocket* _dtlsSocket;
|
||||
HifiSockAddr _localSockAddr;
|
||||
|
|
Loading…
Reference in a new issue