Keep UUID of node in send thread

This commit is contained in:
Atlante45 2015-12-15 16:51:28 -08:00
parent 3cd1eea1dc
commit 51ec7ae2ed
2 changed files with 5 additions and 2 deletions

View file

@ -25,12 +25,13 @@ quint64 endSceneSleepTime = 0;
OctreeSendThread::OctreeSendThread(OctreeServer* myServer, const SharedNodePointer& node) :
_myServer(myServer),
_node(node)
_node(node),
_nodeUuid(node->getUUID())
{
QString safeServerName("Octree");
// set our QThread object name so we can identify this thread while debugging
setObjectName(QString("Octree Send Thread (%1)").arg(uuidStringWithoutCurlyBraces(node->getUUID())));
setObjectName(QString("Octree Send Thread (%1)").arg(uuidStringWithoutCurlyBraces(_nodeUuid)));
if (_myServer) {
safeServerName = _myServer->getMyServerName();

View file

@ -31,6 +31,7 @@ public:
virtual ~OctreeSendThread();
void setIsShuttingDown();
QUuid getNodeUuid() const { return _nodeUuid; }
static AtomicUIntStat _totalBytes;
static AtomicUIntStat _totalWastedBytes;
@ -53,6 +54,7 @@ private:
OctreeServer* _myServer { nullptr };
QWeakPointer<Node> _node;
QUuid _nodeUuid;
OctreePacketData _packetData;