mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-07-23 13:35:06 +02:00
reset nodelist if domain-server stops talking to you, closes #2092
This commit is contained in:
parent
039f9ff1e3
commit
ce3d6d2fca
3 changed files with 8 additions and 0 deletions
|
@ -227,6 +227,7 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
|
||||||
connect(nodeList, SIGNAL(nodeAdded(SharedNodePointer)), &_voxels, SLOT(nodeAdded(SharedNodePointer)));
|
connect(nodeList, SIGNAL(nodeAdded(SharedNodePointer)), &_voxels, SLOT(nodeAdded(SharedNodePointer)));
|
||||||
connect(nodeList, SIGNAL(nodeKilled(SharedNodePointer)), &_voxels, SLOT(nodeKilled(SharedNodePointer)));
|
connect(nodeList, SIGNAL(nodeKilled(SharedNodePointer)), &_voxels, SLOT(nodeKilled(SharedNodePointer)));
|
||||||
connect(nodeList, &NodeList::uuidChanged, this, &Application::updateWindowTitle);
|
connect(nodeList, &NodeList::uuidChanged, this, &Application::updateWindowTitle);
|
||||||
|
connect(nodeList, &NodeList::limitOfSilentDomainCheckInsReached, nodeList, &NodeList::reset);
|
||||||
|
|
||||||
// connect to appropriate slots on AccountManager
|
// connect to appropriate slots on AccountManager
|
||||||
AccountManager& accountManager = AccountManager::getInstance();
|
AccountManager& accountManager = AccountManager::getInstance();
|
||||||
|
|
|
@ -549,6 +549,12 @@ void NodeList::sendDomainServerCheckIn() {
|
||||||
sendSTUNRequest();
|
sendSTUNRequest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (_numNoReplyDomainCheckIns >= MAX_SILENT_DOMAIN_SERVER_CHECK_INS) {
|
||||||
|
// we haven't heard back from DS in MAX_SILENT_DOMAIN_SERVER_CHECK_INS
|
||||||
|
// so emit our signal that indicates that
|
||||||
|
emit limitOfSilentDomainCheckInsReached();
|
||||||
|
}
|
||||||
|
|
||||||
// increment the count of un-replied check-ins
|
// increment the count of un-replied check-ins
|
||||||
_numNoReplyDomainCheckIns++;
|
_numNoReplyDomainCheckIns++;
|
||||||
} else if (AccountManager::getInstance().hasValidAccessToken()) {
|
} else if (AccountManager::getInstance().hasValidAccessToken()) {
|
||||||
|
|
|
@ -132,6 +132,7 @@ signals:
|
||||||
void uuidChanged(const QUuid& ownerUUID);
|
void uuidChanged(const QUuid& ownerUUID);
|
||||||
void nodeAdded(SharedNodePointer);
|
void nodeAdded(SharedNodePointer);
|
||||||
void nodeKilled(SharedNodePointer);
|
void nodeKilled(SharedNodePointer);
|
||||||
|
void limitOfSilentDomainCheckInsReached();
|
||||||
private slots:
|
private slots:
|
||||||
void domainServerAuthReply(const QJsonObject& jsonObject);
|
void domainServerAuthReply(const QJsonObject& jsonObject);
|
||||||
private:
|
private:
|
||||||
|
|
Loading…
Reference in a new issue