mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 17:41:12 +02:00
Fix issue with nackPacketList being accessed after being moved
This commit is contained in:
parent
88f0c7017e
commit
0063eee4a0
1 changed files with 11 additions and 11 deletions
|
@ -238,7 +238,6 @@ int OctreeInboundPacketProcessor::sendNackPackets() {
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
auto nackPacketList = NLPacketList::create(_myServer->getMyEditNackType());
|
|
||||||
auto nodeList = DependencyManager::get<NodeList>();
|
auto nodeList = DependencyManager::get<NodeList>();
|
||||||
int packetsSent = 0;
|
int packetsSent = 0;
|
||||||
|
|
||||||
|
@ -272,18 +271,19 @@ int OctreeInboundPacketProcessor::sendNackPackets() {
|
||||||
|
|
||||||
auto it = missingSequenceNumbers.constBegin();
|
auto it = missingSequenceNumbers.constBegin();
|
||||||
|
|
||||||
while (it != missingSequenceNumbers.constEnd()) {
|
if (it != missingSequenceNumbers.constEnd()) {
|
||||||
unsigned short int sequenceNumber = *it;
|
auto nackPacketList = NLPacketList::create(_myServer->getMyEditNackType());
|
||||||
nackPacketList->writePrimitive(sequenceNumber);
|
|
||||||
++it;
|
while (it != missingSequenceNumbers.constEnd()) {
|
||||||
}
|
unsigned short int sequenceNumber = *it;
|
||||||
|
nackPacketList->writePrimitive(sequenceNumber);
|
||||||
|
++it;
|
||||||
if (nackPacketList->getNumPackets()) {
|
}
|
||||||
|
|
||||||
qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID;
|
qDebug() << "NACK Sent back to editor/client... destinationNode=" << nodeUUID;
|
||||||
|
|
||||||
packetsSent += nackPacketList->getNumPackets();
|
packetsSent += nackPacketList->getNumPackets();
|
||||||
|
|
||||||
// send the list of nack packets
|
// send the list of nack packets
|
||||||
nodeList->sendPacketList(std::move(nackPacketList), *destinationNode);
|
nodeList->sendPacketList(std::move(nackPacketList), *destinationNode);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue