mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-09-19 20:38:42 +02:00
parent
48e7bd6471
commit
babefc5477
@ -51,6 +51,10 @@ function stopAndCleanUpWorkerScript(ws: WorkerScript): void {
|
|||||||
} catch (e: unknown) {
|
} catch (e: unknown) {
|
||||||
handleUnknownError(e, ws, "Error running atExit function.\n\n");
|
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;
|
ws.env.stopFlag = true;
|
||||||
removeWorkerScript(ws);
|
removeWorkerScript(ws);
|
||||||
|
Loading…
Reference in New Issue
Block a user