inference/scheduler: Cancel backend context to avoid leaks

Signed-off-by: Dorin Geman <dorin.geman@docker.com>
This commit is contained in:
Dorin Geman 2025-02-25 15:32:27 +02:00 committed by Jacob Howard
parent c8a97ae68d
commit 8dd1f8dbce
No known key found for this signature in database
GPG Key ID: 3E8B8F7FEB46FC66
1 changed files with 1 additions and 0 deletions

View File

@ -298,6 +298,7 @@ func (s *Scheduler) schedule(ctx context.Context) {
backendCtx, backendCancel = context.WithCancel(ctx)
backendDone = make(chan struct{})
go func() {
defer backendCancel()
s.backends[backend].Run(
backendCtx,
paths.HostServiceSockets().InferenceBackend(backend),