Skip to content

Commit

Permalink
feat: try to optimize memory usage
Browse files Browse the repository at this point in the history
  • Loading branch information
ikxin committed Sep 23, 2024
1 parent 2406076 commit e950349
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion service/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ export const runVlmcs = ({
}: RunVlmcsParams) => {
return new Promise<RunVlmcsResult>(resolve => {
const before = Date.now()
execFile(
const vlmcs = execFile(
`./service/binaries/vlmcs-${platform()}-${arch()}`,
[`${host}:${port}`, `-${protocol}`, `-l ${edition}`],
{ timeout: 10 * 1000 },
Expand All @@ -21,6 +21,7 @@ export const runVlmcs = ({
content: stdout.trim(),
status: err ? false : true,
})
vlmcs.kill()
},
)
})
Expand Down

0 comments on commit e950349

Please sign in to comment.