Teleport and EventQueue reliability improvements. Start plumbing for stayPut()
This commit is contained in:
@@ -17,6 +17,7 @@ export class Caps
|
||||
private capabilities: { [key: string]: string } = {};
|
||||
private clientEvents: ClientEvents;
|
||||
private agent: Agent;
|
||||
private active = false;
|
||||
eventQueueClient: EventQueueClient | null = null;
|
||||
|
||||
constructor(agent: Agent, region: Region, seedURL: string, clientEvents: ClientEvents)
|
||||
@@ -113,7 +114,7 @@ export class Caps
|
||||
req.push('ViewerMetrics');
|
||||
req.push('ViewerStartAuction');
|
||||
req.push('ViewerStats');
|
||||
|
||||
this.active = true;
|
||||
this.request(seedURL, LLSD.LLSD.formatXML(req), 'application/llsd+xml').then((body: string) =>
|
||||
{
|
||||
this.capabilities = LLSD.LLSD.parseXML(body);
|
||||
@@ -211,6 +212,11 @@ export class Caps
|
||||
{
|
||||
return new Promise<string>((resolve, reject) =>
|
||||
{
|
||||
if (!this.active)
|
||||
{
|
||||
reject(new Error('Requesting getCapability to an inactive Caps instance'));
|
||||
return;
|
||||
}
|
||||
this.waitForSeedCapability().then(() =>
|
||||
{
|
||||
if (this.capabilities[capability])
|
||||
@@ -279,5 +285,6 @@ export class Caps
|
||||
{
|
||||
this.eventQueueClient.shutdown();
|
||||
}
|
||||
this.active = false;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user