Merge pull request #45087 from corhere/fix-registry-config-locking
registry: acquire mutex in IsInsecureRegistry
This commit is contained in:
commit
e979518a69
1 changed files with 2 additions and 0 deletions
|
@ -237,5 +237,7 @@ func (s *defaultService) LookupPushEndpoints(hostname string) (endpoints []APIEn
|
|||
// IsInsecureRegistry returns true if the registry at given host is configured as
|
||||
// insecure registry.
|
||||
func (s *defaultService) IsInsecureRegistry(host string) bool {
|
||||
s.mu.RLock()
|
||||
defer s.mu.RUnlock()
|
||||
return !s.config.isSecureIndex(host)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue