mirror of
https://github.com/overte-org/overte.git
synced 2025-08-07 17:50:42 +02:00
Merge pull request #7088 from birarda/offline-domain
fix STUN failover for offline machines
This commit is contained in:
commit
5659589ea1
2 changed files with 5 additions and 3 deletions
|
@ -1073,7 +1073,9 @@ void DomainServer::sendHeartbeatToDataServer(const QString& networkAddress) {
|
||||||
// TODO: have data-web respond with ice-server hostname to use
|
// TODO: have data-web respond with ice-server hostname to use
|
||||||
|
|
||||||
void DomainServer::sendHeartbeatToIceServer() {
|
void DomainServer::sendHeartbeatToIceServer() {
|
||||||
DependencyManager::get<LimitedNodeList>()->sendHeartbeatToIceServer(_iceServerSocket);
|
if (!_iceServerSocket.getAddress().isNull()) {
|
||||||
|
DependencyManager::get<LimitedNodeList>()->sendHeartbeatToIceServer(_iceServerSocket);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void DomainServer::processNodeJSONStatsPacket(QSharedPointer<ReceivedMessage> packetList, SharedNodePointer sendingNode) {
|
void DomainServer::processNodeJSONStatsPacket(QSharedPointer<ReceivedMessage> packetList, SharedNodePointer sendingNode) {
|
||||||
|
|
|
@ -671,7 +671,7 @@ const int NUM_BYTES_STUN_HEADER = 20;
|
||||||
|
|
||||||
void LimitedNodeList::sendSTUNRequest() {
|
void LimitedNodeList::sendSTUNRequest() {
|
||||||
|
|
||||||
if (!_stunSockAddr.isNull()) {
|
if (!_stunSockAddr.getAddress().isNull()) {
|
||||||
const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10;
|
const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10;
|
||||||
|
|
||||||
if (!_hasCompletedInitialSTUN) {
|
if (!_hasCompletedInitialSTUN) {
|
||||||
|
@ -840,7 +840,7 @@ void LimitedNodeList::startSTUNPublicSocketUpdate() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void LimitedNodeList::possiblyTimeoutSTUNAddressLookup() {
|
void LimitedNodeList::possiblyTimeoutSTUNAddressLookup() {
|
||||||
if (_stunSockAddr.isNull()) {
|
if (_stunSockAddr.getAddress().isNull()) {
|
||||||
// our stun address is still NULL, but we've been waiting for long enough - time to force a fail
|
// our stun address is still NULL, but we've been waiting for long enough - time to force a fail
|
||||||
stopInitialSTUNUpdate(false);
|
stopInitialSTUNUpdate(false);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue