mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Potentially fix STUN IP+Port init for heartbeat issue?
This commit is contained in:
parent
cfc7309c96
commit
97681786cd
3 changed files with 9 additions and 10 deletions
|
@ -901,14 +901,13 @@ void DomainServer::setupAutomaticNetworking() {
|
|||
qDebug() << "domain-server" << _automaticNetworkingSetting << "automatic networking enabled for ID"
|
||||
<< uuidStringWithoutCurlyBraces(domainID) << "via" << _oauthProviderURL.toString();
|
||||
|
||||
auto nodeList = DependencyManager::get<LimitedNodeList>();
|
||||
|
||||
// send any public socket changes to the data server so nodes can find us at our new IP
|
||||
connect(nodeList.data(), &LimitedNodeList::publicSockAddrChanged, this,
|
||||
&DomainServer::performIPAddressPortUpdate);
|
||||
|
||||
if (_automaticNetworkingSetting == IP_ONLY_AUTOMATIC_NETWORKING_VALUE) {
|
||||
|
||||
auto nodeList = DependencyManager::get<LimitedNodeList>();
|
||||
|
||||
// send any public socket changes to the data server so nodes can find us at our new IP
|
||||
connect(nodeList.data(), &LimitedNodeList::publicSockAddrChanged,
|
||||
this, &DomainServer::performIPAddressUpdate);
|
||||
|
||||
// have the LNL enable public socket updating via STUN
|
||||
nodeList->startSTUNPublicSocketUpdate();
|
||||
}
|
||||
|
@ -1506,7 +1505,7 @@ QJsonObject jsonForDomainSocketUpdate(const HifiSockAddr& socket) {
|
|||
|
||||
const QString DOMAIN_UPDATE_AUTOMATIC_NETWORKING_KEY = "automatic_networking";
|
||||
|
||||
void DomainServer::performIPAddressUpdate(const HifiSockAddr& newPublicSockAddr) {
|
||||
void DomainServer::performIPAddressPortUpdate(const HifiSockAddr& newPublicSockAddr) {
|
||||
static const QString PUBLIC_SOCKET_ADDRESS_KEY = "network_address";
|
||||
static const QString PUBLIC_SOCKET_PORT_KEY = "port";
|
||||
const QString& publicSocketAddress = newPublicSockAddr.getAddress().toString();
|
||||
|
|
|
@ -112,7 +112,7 @@ private slots:
|
|||
void setupPendingAssignmentCredits();
|
||||
void sendPendingTransactionsToServer();
|
||||
|
||||
void performIPAddressUpdate(const HifiSockAddr& newPublicSockAddr);
|
||||
void performIPAddressPortUpdate(const HifiSockAddr& newPublicSockAddr);
|
||||
void sendHeartbeatToMetaverse() { sendHeartbeatToMetaverse(QString(), int()); }
|
||||
void sendHeartbeatToIceServer();
|
||||
void nodePingMonitor();
|
||||
|
|
|
@ -1197,7 +1197,7 @@ void LimitedNodeList::stopInitialSTUNUpdate(bool success) {
|
|||
}
|
||||
|
||||
// We now setup a timer here to fire every so often to check that our IP address has not changed.
|
||||
// Or, if we failed - if will check if we can eventually get a public socket
|
||||
// Or, if we failed - it will check if we can eventually get a public socket
|
||||
const int STUN_IP_ADDRESS_CHECK_INTERVAL_MSECS = 10 * 1000;
|
||||
|
||||
QTimer* stunOccasionalTimer = new QTimer { this };
|
||||
|
|
Loading…
Reference in a new issue