mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2024-12-19 12:45:45 +01:00
Fix a bug where a JS script would never exit if killed in a sleep loop.
This commit is contained in:
parent
9372236a6e
commit
7045f5d74e
@ -229,6 +229,7 @@ function NetscriptFunctions(workerScript) {
|
||||
workerScript.scriptRef.log("Sleeping for " + time + " milliseconds");
|
||||
}
|
||||
return netscriptDelay(time, workerScript).then(function() {
|
||||
if (workerScript.env.stopFlag) {return Promise.reject(workerScript);}
|
||||
return Promise.resolve(true);
|
||||
});
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user