From 6219528dcb07a78a66e1b5e41eaaef097f4df058 Mon Sep 17 00:00:00 2001 From: Michael Roth Date: Tue, 12 May 2020 00:00:37 +0200 Subject: [PATCH] Remove double process start on init --- mod.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/mod.ts b/mod.ts index bd50a6a..9563ced 100644 --- a/mod.ts +++ b/mod.ts @@ -8,16 +8,14 @@ let appInitTime: number = Date.now(); let timeout: number|null = null; function runApp() { - appInitTime = Date.now(); - app && app.close(); + appInitTime = Date.now(); + app.close(); app = startProcess(Deno.args); } -runApp(); - for await (const event of Deno.watchFs('.')) { if (event.kind !== "access") { if (timeout) clearTimeout(timeout); timeout = setTimeout(runApp, throttle); } -} \ No newline at end of file +}