mirror of
https://github.com/lubosz/overte.git
synced 2025-08-07 19:41:20 +02:00
move domain server check in timer to node thread
This commit is contained in:
parent
87e5133a06
commit
408ecb9735
1 changed files with 5 additions and 3 deletions
|
@ -394,6 +394,11 @@ Application::Application(int& argc, char** argv, QElapsedTimer &startup_time) :
|
||||||
static_cast<NodeList*>(dependency)->deleteLater();
|
static_cast<NodeList*>(dependency)->deleteLater();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// setup a timer for domain-server check ins
|
||||||
|
QTimer* domainCheckInTimer = new QTimer(nodeList);
|
||||||
|
connect(domainCheckInTimer, &QTimer::timeout, nodeList, &NodeList::sendDomainServerCheckIn);
|
||||||
|
domainCheckInTimer->start(DOMAIN_SERVER_CHECK_IN_MSECS);
|
||||||
|
|
||||||
// put the NodeList and datagram processing on the node thread
|
// put the NodeList and datagram processing on the node thread
|
||||||
nodeList->moveToThread(nodeThread);
|
nodeList->moveToThread(nodeThread);
|
||||||
|
|
||||||
|
@ -1781,9 +1786,6 @@ void Application::checkFPS() {
|
||||||
_frameCount = 0;
|
_frameCount = 0;
|
||||||
_datagramProcessor->resetCounters();
|
_datagramProcessor->resetCounters();
|
||||||
_timerStart.start();
|
_timerStart.start();
|
||||||
|
|
||||||
// ask the node list to check in with the domain server
|
|
||||||
DependencyManager::get<NodeList>()->sendDomainServerCheckIn();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::idle() {
|
void Application::idle() {
|
||||||
|
|
Loading…
Reference in a new issue