Do not deliver an action if the target relay is dead

This commit is contained in:
Tony Garnock-Jones 2024-05-28 16:13:19 +02:00
parent 1e08230027
commit d14ddc39f7
1 changed files with 1 additions and 1 deletions

View File

@ -590,7 +590,7 @@ export class Turn {
throw new Error("Attempt to reuse a committed Turn");
}
const a: StructuredTask<TaskAction> = {
perform() { Turn.active._inFacet(relay, a0); },
perform() { relay.isLive && Turn.active._inFacet(relay, a0); },
describe() { return { targetFacet: relay, action: detail() }; },
};
this.queues.get(relay.actor)?.push(a) ?? this.queues.set(relay.actor, [a]);