From 4086f2bc376823c1762454342e7421ce34675d7d Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 14 Jul 2017 15:56:37 -0400 Subject: [PATCH] Replace sync.Mutex with sync.Locker to allow different locks Signed-off-by: Matthew Heon --- server/server.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/server/server.go b/server/server.go index fd6a5ae5..7147ca3f 100644 --- a/server/server.go +++ b/server/server.go @@ -57,7 +57,7 @@ type Server struct { store sstorage.Store storageImageServer storage.ImageServer storageRuntimeServer storage.RuntimeServer - stateLock sync.Mutex + stateLock sync.Locker updateLock sync.RWMutex state *serverState netPlugin ocicni.CNIPlugin @@ -589,6 +589,7 @@ func New(config *Config) (*Server, error) { store: store, storageImageServer: imageService, storageRuntimeServer: storageRuntimeService, + stateLock: new(sync.Mutex), netPlugin: netPlugin, hostportManager: hostportManager, config: *config,