Merge pull request #46547 from thaJeztah/libnetwork_store_nolock

libnetwork: Controller: remove mutex for "store"
This commit is contained in:
Sebastiaan van Stijn 2023-09-27 10:23:32 +02:00 committed by GitHub
commit f3143745b2
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -11,9 +11,6 @@ import (
)
func (c *Controller) initStores() error {
c.mu.Lock()
defer c.mu.Unlock()
if c.cfg == nil {
return nil
}
@ -34,9 +31,6 @@ func (c *Controller) closeStores() {
}
func (c *Controller) getStore() *datastore.Store {
c.mu.Lock()
defer c.mu.Unlock()
return c.store
}