mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-18 05:11:43 +02:00
repairs to early return for sendNackPackets
This commit is contained in:
parent
74193b3dac
commit
9fb8b55359
1 changed files with 7 additions and 7 deletions
|
@ -2693,7 +2693,7 @@ int Application::sendNackPackets() {
|
|||
// if there are octree packets from this node that are waiting to be processed,
|
||||
// don't send a NACK since the missing packets may be among those waiting packets.
|
||||
if (_octreeProcessor.hasPacketsToProcessFrom(nodeUUID)) {
|
||||
packetsSent = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
_octreeSceneStatsLock.lockForRead();
|
||||
|
@ -2701,16 +2701,16 @@ int Application::sendNackPackets() {
|
|||
// retreive octree scene stats of this node
|
||||
if (_octreeServerSceneStats.find(nodeUUID) == _octreeServerSceneStats.end()) {
|
||||
_octreeSceneStatsLock.unlock();
|
||||
packetsSent = 0;
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
// get sequence number stats of node, prune its missing set, and make a copy of the missing set
|
||||
SequenceNumberStats& sequenceNumberStats = _octreeServerSceneStats[nodeUUID].getIncomingOctreeSequenceNumberStats();
|
||||
sequenceNumberStats.pruneMissingSet();
|
||||
const QSet<OCTREE_PACKET_SEQUENCE> missingSequenceNumbers = sequenceNumberStats.getMissingSet();
|
||||
|
||||
|
||||
_octreeSceneStatsLock.unlock();
|
||||
|
||||
|
||||
// construct nack packet(s) for this node
|
||||
auto it = missingSequenceNumbers.constBegin();
|
||||
while (it != missingSequenceNumbers.constEnd()) {
|
||||
|
@ -2718,10 +2718,10 @@ int Application::sendNackPackets() {
|
|||
nackPacketList.writePrimitive(missingNumber);
|
||||
++it;
|
||||
}
|
||||
|
||||
|
||||
if (nackPacketList.getNumPackets()) {
|
||||
packetsSent += nackPacketList.getNumPackets();
|
||||
|
||||
|
||||
// send the packet list
|
||||
nodeList->sendPacketList(nackPacketList, *node);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue