temporary activation of node public socket in VS

This commit is contained in:
Stephen Birarda 2013-10-17 13:01:03 -07:00
parent 628a3ba489
commit 0ae825d761
2 changed files with 6 additions and 1 deletions

View file

@ -83,7 +83,7 @@ void VoxelSendThread::handlePacketSend(Node* node, VoxelNodeData* nodeData, int&
} else {
// just send the voxel packet
NodeList::getInstance()->getNodeSocket()->send(node->getActiveSocket(),
nodeData->getPacket(), nodeData->getPacketLength());
nodeData->getPacket(), nodeData->getPacketLength());
}
// remember to track our stats
nodeData->stats.packetSent(nodeData->getPacketLength());

View file

@ -393,6 +393,11 @@ void VoxelServer::run() {
NODE_TYPE_AGENT,
&senderAddress,
&senderAddress);
// temp activation of public socket before server ping/reply is setup
if (!node->getActiveSocket()) {
node->activatePublicSocket();
}
NodeList::getInstance()->updateNodeWithData(node, packetData, packetLength);