output success on first connection to new ice-server

This commit is contained in:
Stephen Birarda 2016-04-12 18:23:51 -07:00
parent f69f59fa90
commit ab414f65eb
2 changed files with 9 additions and 0 deletions

View file

@ -1120,6 +1120,9 @@ void DomainServer::sendHeartbeatToIceServer() {
// reset the number of no reply ICE hearbeats
_noReplyICEHeartbeats = 0;
// reset the connection flag for ICE server
_connectedToICEServer = false;
randomizeICEServerAddress();
}
@ -2073,6 +2076,11 @@ void DomainServer::processICEServerHeartbeatDenialPacket(QSharedPointer<Received
void DomainServer::processICEServerHeartbeatACK(QSharedPointer<ReceivedMessage> message) {
// we don't do anything with this ACK other than use it to tell us to keep talking to the same ice-server
_noReplyICEHeartbeats = 0;
if (!_connectedToICEServer) {
_connectedToICEServer = true;
qInfo() << "Connected to ice-server at" << _iceServerSocket;
}
}
void DomainServer::handleKeypairChange() {

View file

@ -172,6 +172,7 @@ private:
QTimer* _iceAddressLookupTimer { nullptr }; // this looks like a dangling pointer but is parented to the DomainServer
int _iceAddressLookupID { -1 };
int _noReplyICEHeartbeats { 0 };
bool _connectedToICEServer { false };
friend class DomainGatekeeper;
};