mirror of
https://github.com/lubosz/overte.git
synced 2025-04-14 14:46:55 +02:00
guard startDynamicDomainVerification against missing entity
This commit is contained in:
parent
3ceb9ddee9
commit
698b66313c
1 changed files with 5 additions and 0 deletions
|
@ -504,6 +504,11 @@ void EntityServer::startDynamicDomainVerification() {
|
|||
QString thisDomainID = DependencyManager::get<AddressManager>()->getDomainID().remove(QRegExp("\\{|\\}"));
|
||||
if (jsonObject["domain_id"].toString() != thisDomainID) {
|
||||
EntityItemPointer entity = tree->findEntityByEntityItemID(entityID);
|
||||
if (!entity) {
|
||||
qCDebug(entities) << "Entity undergoing dynamic domain verification is no longer available:" << entityID;
|
||||
networkReply->deleteLater();
|
||||
return;
|
||||
}
|
||||
if (entity->getAge() > (_MAXIMUM_DYNAMIC_DOMAIN_VERIFICATION_TIMER_MS/MSECS_PER_SECOND)) {
|
||||
qCDebug(entities) << "Entity's cert's domain ID" << jsonObject["domain_id"].toString()
|
||||
<< "doesn't match the current Domain ID" << thisDomainID << "; deleting entity" << entityID;
|
||||
|
|
Loading…
Reference in a new issue