Get up and running with Kimi, GLM, MiniMax, DeepSeek, gpt-oss, Qwen, Gemma and other models.
log when the waiting for the process to stop to help debug when other tasks execute during this wait. expire timer clear the timer reference because it will not be reused. close will clean up expireTimer if calling code has not already done this.
Mark Ward63c763685f1d
diff --git a/llm/server.go b/llm/server.goindex c82c50998..c9636a82d 100644--- a/llm/server.go+++ b/llm/server.go@@ -902,7 +902,12 @@ func (s *llmServer) Close() error {if err := s.cmd.Process.Kill(); err != nil {return err}- return s.cmd.Wait()++ if err := s.cmd.Wait(); err != nil {+ return err+ }++ slog.Debug("llama server stopped")}return nildiff --git a/server/sched.go b/server/sched.goindex 482bc39a0..61c5e1b3c 100644--- a/server/sched.go+++ b/server/sched.go@@ -250,6 +250,7 @@ func (s *Scheduler) processCompleted(ctx context.Context) {defer runner.refMu.Unlock()if runner.expireTimer != nil {runner.expireTimer.Stop()+ runner.expireTimer = nil}s.expiredCh <- runner})@@ -430,6 +431,10 @@ type runnerRef struct {// The refMu must already be held when calling unloadfunc (runner *runnerRef) unload() {+ if runner.expireTimer != nil {+ runner.expireTimer.Stop()+ runner.expireTimer = nil+ }if runner.llama != nil {runner.llama.Close()}