mirror of
https://github.com/overte-org/overte.git
synced 2025-08-08 12:37:51 +02:00
Merge pull request #3434 from birarda/master
have domain server confirm access token is present before IP update
This commit is contained in:
commit
c248e1807f
1 changed files with 9 additions and 2 deletions
|
@ -309,8 +309,15 @@ void DomainServer::setupDynamicIPAddressUpdating() {
|
||||||
// send public socket changes to the data server so nodes can find us at our new IP
|
// send public socket changes to the data server so nodes can find us at our new IP
|
||||||
connect(nodeList, &LimitedNodeList::publicSockAddrChanged, this, &DomainServer::sendNewPublicSocketToDataServer);
|
connect(nodeList, &LimitedNodeList::publicSockAddrChanged, this, &DomainServer::sendNewPublicSocketToDataServer);
|
||||||
|
|
||||||
// check our IP address right away
|
if (!AccountManager::getInstance().hasValidAccessToken()) {
|
||||||
requestCurrentIPAddressViaSTUN();
|
// we don't have an access token to talk to data-web yet, so
|
||||||
|
// check our IP address as soon as we get an AccountManager access token
|
||||||
|
connect(&AccountManager::getInstance(), &AccountManager::loginComplete,
|
||||||
|
this, &DomainServer::requestCurrentIPAddressViaSTUN);
|
||||||
|
} else {
|
||||||
|
// access token good to go, attempt to update our IP now
|
||||||
|
requestCurrentIPAddressViaSTUN();
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
qDebug() << "Cannot enable dynamic domain-server IP address updating without a domain ID."
|
qDebug() << "Cannot enable dynamic domain-server IP address updating without a domain ID."
|
||||||
|
|
Loading…
Reference in a new issue