mirror of
https://github.com/aljazceru/kata-containers.git
synced 2025-12-23 01:04:25 +01:00
virtcontainers/api: use RW lock to update containers
When a container is updated, those modifications are stored, to avoid race conditions with other operations, a RW lock should be used. fixes #346 Signed-off-by: Julio Montes <julio.montes@intel.com>
This commit is contained in:
@@ -615,7 +615,7 @@ func UpdateContainer(sandboxID, containerID string, resources specs.LinuxResourc
|
||||
return errNeedContainerID
|
||||
}
|
||||
|
||||
lockFile, err := rLockSandbox(sandboxID)
|
||||
lockFile, err := rwLockSandbox(sandboxID)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user