mirror of
https://github.com/kata-containers/kata-containers.git
synced 2025-06-28 08:17:37 +00: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:
parent
9fb0b337ef
commit
7d435b84f0
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user