Skip to content

Commit

Permalink
Merge pull request #200 from anchore/fix-mutex
Browse files Browse the repository at this point in the history
fix: missing lock reading results map
  • Loading branch information
bradleyjones authored Apr 10, 2024
2 parents 341f304 + 6c6d12a commit 34b7fbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/adapter/anchore/result_store.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ func (m *MemoryResultStore) RequestAnalysisStatus(
// Result not found so begin the async fetch
go func() {
complete, err := buildFn()
currentState := m.Results[scanID]
currentState, _ := m.GetResult(scanID)
if err != nil {
log.Debugf("error checking analysis state for %v: %v", scanID, err)
// Set IsComplete to true to remove the scan from the store if the create scan fails so that it can be retried without using the cache.
Expand Down

0 comments on commit 34b7fbd

Please sign in to comment.