From 0cda01f105304010d94f6343ded155d58569c9ce Mon Sep 17 00:00:00 2001 From: Seth Alves Date: Tue, 18 Oct 2016 10:29:35 -0700 Subject: [PATCH] send stats to domain-server with networking thread --- libraries/networking/src/NodeList.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index f2b28a04a7..e233860d18 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -251,11 +251,16 @@ void NodeList::addSetOfNodeTypesToNodeInterestSet(const NodeSet& setOfNodeTypes) } void NodeList::sendDomainServerCheckIn() { + if (thread() != QThread::currentThread()) { + QMetaObject::invokeMethod(this, "sendDomainServerCheckIn", Qt::QueuedConnection); + return; + } + if (_isShuttingDown) { qCDebug(networking) << "Refusing to send a domain-server check in while shutting down."; return; } - + if (_publicSockAddr.isNull()) { // we don't know our public socket and we need to send it to the domain server qCDebug(networking) << "Waiting for inital public socket from STUN. Will not send domain-server check in.";