Merge pull request #7088 from birarda/offline-domain

fix STUN failover for offline machines
This commit is contained in:
Seth Alves 2016-02-12 09:16:20 -08:00
commit 5659589ea1
2 changed files with 5 additions and 3 deletions

View file

@ -1073,7 +1073,9 @@ void DomainServer::sendHeartbeatToDataServer(const QString& networkAddress) {
// TODO: have data-web respond with ice-server hostname to use
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) {

View file

@ -671,7 +671,7 @@ const int NUM_BYTES_STUN_HEADER = 20;
void LimitedNodeList::sendSTUNRequest() {
if (!_stunSockAddr.isNull()) {
if (!_stunSockAddr.getAddress().isNull()) {
const int NUM_INITIAL_STUN_REQUESTS_BEFORE_FAIL = 10;
if (!_hasCompletedInitialSTUN) {
@ -840,7 +840,7 @@ void LimitedNodeList::startSTUNPublicSocketUpdate() {
}
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
stopInitialSTUNUpdate(false);
}