From 4acf870e7b6a0ab1ee3499a02cfe67d62bb7ffca Mon Sep 17 00:00:00 2001 From: JOLIMAITRE Matthieu Date: Sat, 3 Feb 2024 23:31:41 +0100 Subject: [PATCH] fix looping errors 2 --- instance/src/lib/utils.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/instance/src/lib/utils.ts b/instance/src/lib/utils.ts index 78f6f18..c46c003 100644 --- a/instance/src/lib/utils.ts +++ b/instance/src/lib/utils.ts @@ -60,7 +60,9 @@ export function loop_process( const kill_sig = channel<"kill">(); kill_sig.receive().then(() => { control.do_continue = false; - control.child_process?.kill(); + try { + control.child_process?.kill(); + } catch (_) { /* isok */ } }); async function launch() { while (control.do_continue) {