mirror of
https://github.com/ollama/ollama.git
synced 2025-11-11 11:37:23 +01:00
close server on receiving signal (#4213)
This commit is contained in:
@@ -1041,6 +1041,7 @@ func Serve(ln net.Listener) error {
|
||||
signal.Notify(signals, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-signals
|
||||
srvr.Close()
|
||||
done()
|
||||
sched.unloadAllRunners()
|
||||
gpu.Cleanup()
|
||||
|
||||
Reference in New Issue
Block a user