Fix some issues with object processing

This commit is contained in:
Casper Warden
2023-11-16 21:53:55 +00:00
parent e385564e26
commit be8ee8f0c5
4 changed files with 18 additions and 4 deletions

View File

@@ -89,6 +89,7 @@ export class ObjectStoreLite implements IObjectStore
private physicsSubscription: Subscription;
private selectedPrimsWithoutUpdate = new Map<number, boolean>();
private selectedChecker?: Timer;
private blacklist: Map<number, Date> = new Map<number, Date>();
rtree?: RBush3D;
@@ -455,6 +456,19 @@ export class ObjectStoreLite implements IObjectStore
return;
}
this.requestedObjects.add(localID);
const black = this.blacklist.get(localID);
if (black !== undefined)
{
const thirtyMinutesAgo = new Date(new Date().getTime() - 30 * 60000);
if (black >= thirtyMinutesAgo)
{
return;
}
else
{
this.blacklist.delete(localID);
}
}
const rmo = new RequestMultipleObjectsMessage();
rmo.AgentData = {
AgentID: this.agent.agentID,
@@ -507,8 +521,8 @@ export class ObjectStoreLite implements IObjectStore
{
return;
}
this.blacklist.set(localID, new Date());
console.error('Error retrieving missing object after 5 attempts: ' + localID);
console.error(error);
}
}
finally