Browse Source

fix runner expire during active use. Clearing the expire timer as it is used. Allowing the finish to assign an expire timer so that the runner will expire after no use.

Mark Ward 1 năm trước cách đây
mục cha
commit
f4a73d57a4
1 tập tin đã thay đổi với 4 bổ sung0 xóa
  1. 4 0
      server/sched.go

+ 4 - 0
server/sched.go

@@ -296,6 +296,10 @@ func (pending *LlmRequest) useLoadedRunner(runner *runnerRef, finished chan *Llm
 	runner.refMu.Lock()
 	defer runner.refMu.Unlock()
 	runner.refCount++
+	if runner.expireTimer != nil {
+		runner.expireTimer.Stop()
+		runner.expireTimer = nil
+	}
 	runner.sessionDuration = pending.sessionDuration
 	pending.successCh <- runner
 	go func() {