mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 15:29:32 +02:00
fix for stopping a nullptr QTimer
This commit is contained in:
parent
111a8caa3c
commit
8c6449a886
2 changed files with 5 additions and 3 deletions
|
@ -94,7 +94,7 @@ NodeList::NodeList(char newOwnerType, unsigned short socketListenPort, unsigned
|
||||||
_keepAlivePingTimer.setInterval(KEEPALIVE_PING_INTERVAL_MS);
|
_keepAlivePingTimer.setInterval(KEEPALIVE_PING_INTERVAL_MS);
|
||||||
connect(&_keepAlivePingTimer, &QTimer::timeout, this, &NodeList::sendKeepAlivePings);
|
connect(&_keepAlivePingTimer, &QTimer::timeout, this, &NodeList::sendKeepAlivePings);
|
||||||
connect(&_domainHandler, SIGNAL(connectedToDomain(QString)), &_keepAlivePingTimer, SLOT(start()));
|
connect(&_domainHandler, SIGNAL(connectedToDomain(QString)), &_keepAlivePingTimer, SLOT(start()));
|
||||||
connect(&_domainHandler, &DomainHandler::disconnectedFromDomain, this, &NodeList::stopKeepalivePingTimer);
|
connect(&_domainHandler, &DomainHandler::disconnectedFromDomain, &_keepAlivePingTimer, &QTimer::stop);
|
||||||
|
|
||||||
// we definitely want STUN to update our public socket, so call the LNL to kick that off
|
// we definitely want STUN to update our public socket, so call the LNL to kick that off
|
||||||
startSTUNPublicSocketUpdate();
|
startSTUNPublicSocketUpdate();
|
||||||
|
|
|
@ -122,8 +122,10 @@ void ThreadedAssignment::startSendingStats() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadedAssignment::stopSendingStats() {
|
void ThreadedAssignment::stopSendingStats() {
|
||||||
|
if (_statsTimer) {
|
||||||
// stop sending stats, we just disconnected from domain
|
// stop sending stats, we just disconnected from domain
|
||||||
_statsTimer->stop();
|
_statsTimer->stop();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ThreadedAssignment::checkInWithDomainServerOrExit() {
|
void ThreadedAssignment::checkInWithDomainServerOrExit() {
|
||||||
|
|
Loading…
Reference in a new issue