Merge pull request #6716 from birarda/master

fix for stop of a nullptr QTimer
This commit is contained in:
Ryan Huffman 2015-12-21 15:21:42 -08:00
commit f5f0829216
2 changed files with 5 additions and 3 deletions

View file

@ -94,7 +94,7 @@ NodeList::NodeList(char newOwnerType, unsigned short socketListenPort, unsigned
_keepAlivePingTimer.setInterval(KEEPALIVE_PING_INTERVAL_MS);
connect(&_keepAlivePingTimer, &QTimer::timeout, this, &NodeList::sendKeepAlivePings);
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
startSTUNPublicSocketUpdate();

View file

@ -122,8 +122,10 @@ void ThreadedAssignment::startSendingStats() {
}
void ThreadedAssignment::stopSendingStats() {
// stop sending stats, we just disconnected from domain
_statsTimer->stop();
if (_statsTimer) {
// stop sending stats, we just disconnected from domain
_statsTimer->stop();
}
}
void ThreadedAssignment::checkInWithDomainServerOrExit() {