From 137f58c36d8aaa6ce91e1f5c121a76123d12a67d Mon Sep 17 00:00:00 2001 From: Snarling <84951833+Snarling@users.noreply.github.com> Date: Thu, 1 Sep 2022 08:37:59 -0400 Subject: [PATCH] actually exitOnExit --- src/NetscriptFunctions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/NetscriptFunctions.ts b/src/NetscriptFunctions.ts index e7f1b1e6d..e85dd5d0b 100644 --- a/src/NetscriptFunctions.ts +++ b/src/NetscriptFunctions.ts @@ -836,7 +836,7 @@ const base: InternalAPI = { }, exit: (ctx: NetscriptContext) => (): never => { helpers.log(ctx, () => "Exiting..."); - ctx.workerScript.env.stopFlag = true; + killWorkerScript(ctx.workerScript); throw new ScriptDeath(ctx.workerScript); }, scp: