mirror of
https://github.com/overte-org/overte.git
synced 2025-08-06 16:36:54 +02:00
Merge branch 'master' of github.com:highfidelity/hifi into black
This commit is contained in:
commit
e2f3c99cf1
4 changed files with 27 additions and 13 deletions
|
@ -463,19 +463,15 @@ SharedNodePointer DomainGatekeeper::processAgentConnectRequest(const NodeConnect
|
||||||
limitedNodeList->eachNodeBreakable([nodeConnection, username, &existingNodeID](const SharedNodePointer& node){
|
limitedNodeList->eachNodeBreakable([nodeConnection, username, &existingNodeID](const SharedNodePointer& node){
|
||||||
|
|
||||||
if (node->getPublicSocket() == nodeConnection.publicSockAddr && node->getLocalSocket() == nodeConnection.localSockAddr) {
|
if (node->getPublicSocket() == nodeConnection.publicSockAddr && node->getLocalSocket() == nodeConnection.localSockAddr) {
|
||||||
// we have a node that already has these exact sockets - this can occur if a node
|
// we have a node that already has these exact sockets
|
||||||
// is failing to connect to the domain
|
// this can occur if a node is failing to connect to the domain
|
||||||
|
|
||||||
// we'll re-use the existing node ID
|
// remove the old node before adding the new node
|
||||||
// as long as the user hasn't changed their username (by logging in or logging out)
|
qDebug() << "Deleting existing connection from same sockaddr: " << node->getUUID();
|
||||||
auto existingNodeData = static_cast<DomainServerNodeData*>(node->getLinkedData());
|
existingNodeID = node->getUUID();
|
||||||
|
return false;
|
||||||
if (existingNodeData->getUsername() == username) {
|
|
||||||
qDebug() << "Deleting existing connection from same sockaddr: " << node->getUUID();
|
|
||||||
existingNodeID = node->getUUID();
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
|
@ -765,7 +765,6 @@ void GLBackend::recycle() const {
|
||||||
}
|
}
|
||||||
|
|
||||||
_textureManagement._transferEngine->manageMemory();
|
_textureManagement._transferEngine->manageMemory();
|
||||||
Texture::KtxStorage::releaseOpenKtxFiles();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void GLBackend::setCameraCorrection(const Mat4& correction, const Mat4& prevRenderView, bool reset) {
|
void GLBackend::setCameraCorrection(const Mat4& correction, const Mat4& prevRenderView, bool reset) {
|
||||||
|
|
|
@ -405,6 +405,7 @@ bool GLTextureTransferEngineDefault::processActiveBufferQueue() {
|
||||||
_activeTransferQueue.splice(_activeTransferQueue.end(), activeBufferQueue);
|
_activeTransferQueue.splice(_activeTransferQueue.end(), activeBufferQueue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Texture::KtxStorage::releaseOpenKtxFiles();
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -273,6 +273,7 @@ void NodeList::reset(bool skipDomainHandlerReset) {
|
||||||
|
|
||||||
// refresh the owner UUID to the NULL UUID
|
// refresh the owner UUID to the NULL UUID
|
||||||
setSessionUUID(QUuid());
|
setSessionUUID(QUuid());
|
||||||
|
setSessionLocalID(Node::NULL_LOCAL_ID);
|
||||||
|
|
||||||
// if we setup the DTLS socket, also disconnect from the DTLS socket readyRead() so it can handle handshaking
|
// if we setup the DTLS socket, also disconnect from the DTLS socket readyRead() so it can handle handshaking
|
||||||
if (_dtlsSocket) {
|
if (_dtlsSocket) {
|
||||||
|
@ -647,6 +648,23 @@ void NodeList::processDomainServerList(QSharedPointer<ReceivedMessage> message)
|
||||||
Node::LocalID newLocalID;
|
Node::LocalID newLocalID;
|
||||||
packetStream >> newUUID;
|
packetStream >> newUUID;
|
||||||
packetStream >> newLocalID;
|
packetStream >> newLocalID;
|
||||||
|
|
||||||
|
// when connected, if the session ID or local ID were not null and changed, we should reset
|
||||||
|
auto currentLocalID = getSessionLocalID();
|
||||||
|
auto currentSessionID = getSessionUUID();
|
||||||
|
if (_domainHandler.isConnected() &&
|
||||||
|
((currentLocalID != Node::NULL_LOCAL_ID && newLocalID != currentLocalID) ||
|
||||||
|
(!currentSessionID.isNull() && newUUID != currentSessionID))) {
|
||||||
|
qCDebug(networking) << "Local ID or Session ID changed while connected to domain - forcing NodeList reset";
|
||||||
|
|
||||||
|
// reset the nodelist, but don't do a domain handler reset since we're about to process a good domain list
|
||||||
|
reset(true);
|
||||||
|
|
||||||
|
// tell the domain handler that we're no longer connected so that below
|
||||||
|
// it can re-perform actions as if we just connected
|
||||||
|
_domainHandler.setIsConnected(false);
|
||||||
|
}
|
||||||
|
|
||||||
setSessionLocalID(newLocalID);
|
setSessionLocalID(newLocalID);
|
||||||
setSessionUUID(newUUID);
|
setSessionUUID(newUUID);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue