Update extensions/inference-nitro-extension/src/module.ts
Co-authored-by: Louis <louis@jan.ai>
This commit is contained in:
parent
539f11e583
commit
96fa392fba
@ -189,14 +189,14 @@ async function validateModelStatus(): Promise<ModelOperationResponse> {
|
|||||||
*/
|
*/
|
||||||
function killSubprocess(): Promise<void> {
|
function killSubprocess(): Promise<void> {
|
||||||
if (subprocess) {
|
if (subprocess) {
|
||||||
fetch(NITRO_HTTP_KILL_URL, {
|
return fetch(NITRO_HTTP_KILL_URL, {
|
||||||
method: "DELETE",
|
method: "DELETE",
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
console.error(err);
|
console.error(err);
|
||||||
subprocess.kill();
|
subprocess.kill();
|
||||||
subprocess = null;
|
subprocess = null;
|
||||||
return killSubprocess();
|
return kill(PORT, "tcp").then(console.log).catch(console.log);
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
return kill(PORT, "tcp").then(console.log).catch(console.log);
|
return kill(PORT, "tcp").then(console.log).catch(console.log);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user