From a3c95bf903fe043eb3ab3224e3835e94596496f0 Mon Sep 17 00:00:00 2001 From: Matthew Heon Date: Fri, 14 Jul 2017 17:09:08 -0400 Subject: [PATCH] Change opLock mutex for containers to sync.Locker Signed-off-by: Matthew Heon --- oci/container.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/oci/container.go b/oci/container.go index 5cedd833..2e70390e 100644 --- a/oci/container.go +++ b/oci/container.go @@ -37,7 +37,7 @@ type Container struct { trusted bool state *ContainerState metadata *pb.ContainerMetadata - opLock sync.Mutex + opLock sync.Locker // this is the /var/run/storage/... directory, erased on reboot bundlePath string // this is the /var/lib/storage/... directory @@ -79,6 +79,7 @@ func NewContainer(id string, name string, bundlePath string, logPath string, net dir: dir, state: state, stopSignal: stopSignal, + opLock: new(sync.Mutex), } return c, nil }