Unverified Commit 5d71bda4 authored by Bruce MacDonald's avatar Bruce MacDonald Committed by GitHub
Browse files

close llm on interrupt (#577)

parent 9df31c35
......@@ -570,6 +570,9 @@ func Serve(ln net.Listener, allowOrigins []string) error {
signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)
go func() {
<-signals
if loaded.llm != nil {
loaded.llm.Close()
}
os.RemoveAll(workDir)
os.Exit(0)
}()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment