mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-11-09 17:23:53 +01:00
parent
48e7bd6471
commit
babefc5477
@ -51,6 +51,10 @@ function stopAndCleanUpWorkerScript(ws: WorkerScript): void {
|
||||
} catch (e: unknown) {
|
||||
handleUnknownError(e, ws, "Error running atExit function.\n\n");
|
||||
}
|
||||
if (ws.env.stopFlag) {
|
||||
// If atExit() kills the script, we'll already be stopped, don't stop again.
|
||||
return;
|
||||
}
|
||||
}
|
||||
ws.env.stopFlag = true;
|
||||
removeWorkerScript(ws);
|
||||
|
Loading…
Reference in New Issue
Block a user