diff --git a/extensions/inference-nitro-extension/src/module.ts b/extensions/inference-nitro-extension/src/module.ts index ce18e653b..d69cba9c3 100644 --- a/extensions/inference-nitro-extension/src/module.ts +++ b/extensions/inference-nitro-extension/src/module.ts @@ -189,14 +189,14 @@ async function validateModelStatus(): Promise { */ function killSubprocess(): Promise { if (subprocess) { - fetch(NITRO_HTTP_KILL_URL, { + return fetch(NITRO_HTTP_KILL_URL, { method: "DELETE", }).catch((err) => { console.error(err); subprocess.kill(); subprocess = null; - return killSubprocess(); - }); + return kill(PORT, "tcp").then(console.log).catch(console.log); +}); } else { return kill(PORT, "tcp").then(console.log).catch(console.log); }