mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-29 22:22:54 +02:00
switch to explicit lock and unlock in removeSilentNodes
This commit is contained in:
parent
3355b71d6b
commit
816b324236
1 changed files with 3 additions and 1 deletions
|
@ -784,7 +784,7 @@ void NodeList::removeSilentNodes() {
|
||||||
while (nodeItem != _nodeHash.end()) {
|
while (nodeItem != _nodeHash.end()) {
|
||||||
SharedNodePointer node = nodeItem.value();
|
SharedNodePointer node = nodeItem.value();
|
||||||
|
|
||||||
QMutexLocker(&node->getMutex());
|
node->getMutex().lock();
|
||||||
|
|
||||||
if ((usecTimestampNow() - node->getLastHeardMicrostamp()) > NODE_SILENCE_THRESHOLD_USECS) {
|
if ((usecTimestampNow() - node->getLastHeardMicrostamp()) > NODE_SILENCE_THRESHOLD_USECS) {
|
||||||
// call our private method to kill this node (removes it and emits the right signal)
|
// call our private method to kill this node (removes it and emits the right signal)
|
||||||
|
@ -793,6 +793,8 @@ void NodeList::removeSilentNodes() {
|
||||||
// we didn't kill this node, push the iterator forwards
|
// we didn't kill this node, push the iterator forwards
|
||||||
++nodeItem;
|
++nodeItem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
node->getMutex().unlock();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue