Check for and prevent cross-actor facet termination
This commit is contained in:
parent
ce598e6954
commit
888b3be291
|
@ -366,6 +366,9 @@ export class Turn {
|
|||
}
|
||||
|
||||
stop(facet: Facet, continuation?: LocalAction) {
|
||||
if (facet.actor !== Turn.activeFacet.actor) {
|
||||
throw new Error("Attempt to terminate a facet in a different actor");
|
||||
}
|
||||
if (continuation) facet.onStop(continuation);
|
||||
facet._terminate(true);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue