diff --git a/ice-server/src/IceServer.cpp b/ice-server/src/IceServer.cpp index cea05ebe30..0877c8591f 100644 --- a/ice-server/src/IceServer.cpp +++ b/ice-server/src/IceServer.cpp @@ -53,13 +53,15 @@ void IceServer::processDatagrams() { if (!matchingPeer) { // if we don't have this sender we need to create them now matchingPeer = SharedNetworkPeer(new NetworkPeer(senderUUID, publicSocket, localSocket)); + _activePeers.insert(senderUUID, matchingPeer); qDebug() << "Added a new network peer" << *matchingPeer; - } else { // we already had the peer so just potentially update their sockets matchingPeer->setPublicSocket(publicSocket); matchingPeer->setLocalSocket(localSocket); + + qDebug() << "Matched hearbeat to existing network peer" << *matchingPeer; } // check if this node also included a UUID that they would like to connect to diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 451b30c58b..afefd2a5c1 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -250,7 +250,7 @@ void NodeList::sendDomainServerCheckIn() { bool isUsingDTLS = false; PacketType domainPacketType = !_domainHandler.isConnected() - ? PacketTypeDomainConnectRequest : PacketTypeDomainListRequest; + ? PacketTypeDomainConnectRequest : PacketTypeDomainListRequest; if (!_domainHandler.isConnected()) { qDebug() << "Sending connect request to domain-server at" << _domainHandler.getHostname(); @@ -303,7 +303,10 @@ void NodeList::sendDomainServerCheckIn() { } void NodeList::sendICERequestForDomainConnection() { - QByteArray iceRequestByteArray = byteArrayWithPopulatedHeader(PacketTypeIceServerHeartbeat); + + static QUuid iceUUID = QUuid::createUuid(); + + QByteArray iceRequestByteArray = byteArrayWithPopulatedHeader(PacketTypeIceServerHeartbeat, iceUUID); QDataStream iceDataStream(&iceRequestByteArray, QIODevice::Append); iceDataStream << _publicSockAddr << HifiSockAddr(QHostAddress(getHostOrderLocalAddress()), _nodeSocket.localPort());