mirror of
https://github.com/dogkeeper886/ollama37.git
synced 2025-12-17 03:07:00 +00:00
address comment
This commit is contained in:
@@ -115,15 +115,14 @@ function server() {
|
|||||||
logger.error(data.toString().trim())
|
logger.error(data.toString().trim())
|
||||||
})
|
})
|
||||||
|
|
||||||
function restart(code: number) {
|
function restart() {
|
||||||
logger.info(`Server exited with code: ${code}`)
|
|
||||||
setTimeout(server, 3000)
|
setTimeout(server, 3000)
|
||||||
}
|
}
|
||||||
|
|
||||||
proc.on('exit', code => restart(code))
|
proc.on('exit', restart)
|
||||||
|
|
||||||
app.on('before-quit', () => {
|
app.on('before-quit', () => {
|
||||||
proc.off('exit', code => restart(code))
|
proc.off('exit', restart)
|
||||||
proc.kill()
|
proc.kill()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user