CR feedback

This commit is contained in:
ZappoMan 2014-04-21 17:45:38 -07:00
parent 91d8e11393
commit 60b8ab0de5

View file

@ -839,6 +839,11 @@ void OctreeServer::readPendingDatagrams() {
nodeList->updateNodeWithDataFromPacket(matchingNode, receivedPacket);
OctreeQueryNode* nodeData = (OctreeQueryNode*) matchingNode->getLinkedData();
if (nodeData && !nodeData->isOctreeSendThreadInitalized()) {
// NOTE: this is an important aspect of the proper ref counting. The send threads/node data need to
// know that the OctreeServer/Assignment will not get deleted on it while it's still active. The
// solution is to get the shared pointer for the current assignment. We need to make sure this is the
// same SharedAssignmentPointer that was ref counted by the assignment client.
SharedAssignmentPointer sharedAssignment = AssignmentClient::getCurrentAssignment();
nodeData->initializeOctreeSendThread(sharedAssignment, matchingNode);
}