send the domain disconnect packet before UUID is cleared

This commit is contained in:
Stephen Birarda 2017-04-25 14:32:21 -07:00
parent cd023e0384
commit c00dfcc7d7
2 changed files with 3 additions and 5 deletions

View file

@ -644,8 +644,6 @@ SharedNodePointer LimitedNodeList::addOrUpdateNode(const QUuid& uuid, NodeType_t
}
}
std::unique_ptr<NLPacket> LimitedNodeList::constructPingPacket(PingType_t pingType) {
int packetSize = sizeof(PingType_t) + sizeof(quint64);

View file

@ -257,14 +257,14 @@ void NodeList::reset() {
_avatarGainMap.clear();
_avatarGainMapLock.unlock();
// refresh the owner UUID to the NULL UUID
setSessionUUID(QUuid());
if (sender() != &_domainHandler) {
// clear the domain connection information, unless they're the ones that asked us to reset
_domainHandler.softReset();
}
// refresh the owner UUID to the NULL UUID
setSessionUUID(QUuid());
// if we setup the DTLS socket, also disconnect from the DTLS socket readyRead() so it can handle handshaking
if (_dtlsSocket) {
disconnect(_dtlsSocket, 0, this, 0);