Merge pull request #6559 from birarda/log-handler-crash

reset the NodeList on its own thread
This commit is contained in:
Brad Hefta-Gaub 2015-12-04 11:44:06 -08:00
commit 84b98c93a1
2 changed files with 6 additions and 1 deletions

View file

@ -94,7 +94,7 @@ void DomainHandler::softReset() {
clearSettings(); clearSettings();
// cancel the failure timeout for any pending requests for settings // cancel the failure timeout for any pending requests for settings
QMetaObject::invokeMethod(&_settingsTimer, "stop", Qt::AutoConnection); QMetaObject::invokeMethod(&_settingsTimer, "stop");
} }
void DomainHandler::hardReset() { void DomainHandler::hardReset() {

View file

@ -200,6 +200,11 @@ void NodeList::processICEPingPacket(QSharedPointer<NLPacket> packet) {
} }
void NodeList::reset() { void NodeList::reset() {
if (thread() != QThread::currentThread()) {
QMetaObject::invokeMethod(this, "reset", Qt::BlockingQueuedConnection);
return;
}
LimitedNodeList::reset(); LimitedNodeList::reset();
_numNoReplyDomainCheckIns = 0; _numNoReplyDomainCheckIns = 0;