diff --git a/src/evaluators.js b/src/evaluators.js index 5b4c275..c9241b2 100644 --- a/src/evaluators.js +++ b/src/evaluators.js @@ -68,12 +68,14 @@ module.exports.PythonEvaluator = class{ // (pyshell callback only happens when process exits voluntarily) this.pyshell.childProcess.on('exit',()=>{ restarting = true + this.running = false this.startPython() }) // pyshell has 50 ms to die gracefully var dead = this.pyshell.childProcess.kill() if(!dead) console.info("pyshell refused to die") + else this.running = false setTimeout(()=>{ if(!dead && !restarting){ @@ -82,6 +84,7 @@ module.exports.PythonEvaluator = class{ if(!dead){ console.error("the python process simply cannot be killed!") } + else this.running = false } }, 50) }