fix(bugseti): acquire mutex in NewQueueService before load()
q.load() accesses shared state (issues, seen, current) without holding the mutex, creating a race condition. Wrap the call with q.mu.Lock(). Fixes #52 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
d5771ed817
commit
3af5ce687c
1 changed files with 2 additions and 0 deletions
|
|
@ -103,7 +103,9 @@ func NewQueueService(config *ConfigService) *QueueService {
|
|||
seen: make(map[string]bool),
|
||||
}
|
||||
heap.Init(&q.issues)
|
||||
q.mu.Lock()
|
||||
q.load() // Load persisted queue
|
||||
q.mu.Unlock()
|
||||
return q
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue