Skip to content

Commit

Permalink
lock while map access
Browse files Browse the repository at this point in the history
  • Loading branch information
Sebastian Mancke committed Feb 16, 2017
1 parent 0a23c38 commit 295b2aa
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions composition/content_fetcher.go
Expand Up @@ -148,7 +148,9 @@ func (fetcher *ContentFetcher) addDependentFetchJobs(content Content) {
fetcher.AddFetchJob(fetch)
}
for dependencyName, params := range content.Dependencies() {
fetcher.r.mutex.Lock()
_, alreadySheduled := fetcher.r.sheduledFetchDefinitionNames[dependencyName]
fetcher.r.mutex.Unlock()
if !alreadySheduled {
lazyFd, existing, err := fetcher.lazyFdFactory(dependencyName, params)
if err != nil {
Expand Down

0 comments on commit 295b2aa

Please sign in to comment.