mirror of
https://github.com/overte-org/overte.git
synced 2025-04-21 09:24:00 +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
|
||||
connect(nodeList, &LimitedNodeList::publicSockAddrChanged, this, &DomainServer::sendNewPublicSocketToDataServer);
|
||||
|
||||
// check our IP address right away
|
||||
requestCurrentIPAddressViaSTUN();
|
||||
if (!AccountManager::getInstance().hasValidAccessToken()) {
|
||||
// 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 {
|
||||
qDebug() << "Cannot enable dynamic domain-server IP address updating without a domain ID."
|
||||
|
|
Loading…
Reference in a new issue