Skip to content

Commit

Permalink
fix a data race for singleton scope instances
Browse files Browse the repository at this point in the history
  • Loading branch information
bastianccm committed Nov 6, 2018
1 parent e8acca6 commit 3d0b66a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scope.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ func (s *SingletonScope) ResolveType(t reflect.Type, annotation string, unscoped

s.instances[ident] = unscoped(t, annotation, false)

s.instanceLock[ident].Unlock()
defer s.instanceLock[ident].Unlock()

return s.instances[ident]
}
Expand Down

0 comments on commit 3d0b66a

Please sign in to comment.