Skip to content

Commit f72f149

Browse files
committed
chore: Fix missing unlock in processPending function
1 parent 945a3c5 commit f72f149

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

server/sched.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ func (s *Scheduler) processPending(ctx context.Context) {
119119
for _, runnerList := range s.loaded {
120120
loadedCount += len(runnerList)
121121
}
122-
s.loadedMu.Unlock()
122+
123123
var runner *runnerRef = nil
124124
if len(runners) > 0 {
125125
var minRef = runners[0].refCount
@@ -130,6 +130,8 @@ func (s *Scheduler) processPending(ctx context.Context) {
130130
}
131131
}
132132
}
133+
s.loadedMu.Unlock()
134+
133135
if runner != nil {
134136
if runner.needsReload(ctx, pending) {
135137
runnerToExpire = runner

0 commit comments

Comments
 (0)