Replace sync.Mutex with sync.Locker to allow different locks
Signed-off-by: Matthew Heon <mheon@redhat.com>
This commit is contained in:
parent
96ebf829c9
commit
4086f2bc37
1 changed files with 2 additions and 1 deletions
|
@ -57,7 +57,7 @@ type Server struct {
|
||||||
store sstorage.Store
|
store sstorage.Store
|
||||||
storageImageServer storage.ImageServer
|
storageImageServer storage.ImageServer
|
||||||
storageRuntimeServer storage.RuntimeServer
|
storageRuntimeServer storage.RuntimeServer
|
||||||
stateLock sync.Mutex
|
stateLock sync.Locker
|
||||||
updateLock sync.RWMutex
|
updateLock sync.RWMutex
|
||||||
state *serverState
|
state *serverState
|
||||||
netPlugin ocicni.CNIPlugin
|
netPlugin ocicni.CNIPlugin
|
||||||
|
@ -589,6 +589,7 @@ func New(config *Config) (*Server, error) {
|
||||||
store: store,
|
store: store,
|
||||||
storageImageServer: imageService,
|
storageImageServer: imageService,
|
||||||
storageRuntimeServer: storageRuntimeService,
|
storageRuntimeServer: storageRuntimeService,
|
||||||
|
stateLock: new(sync.Mutex),
|
||||||
netPlugin: netPlugin,
|
netPlugin: netPlugin,
|
||||||
hostportManager: hostportManager,
|
hostportManager: hostportManager,
|
||||||
config: *config,
|
config: *config,
|
||||||
|
|
Loading…
Reference in a new issue