change rlock to lock

Signed-off-by: Victor Vieux <vieux@docker.com>
This commit is contained in:
Victor Vieux 2016-01-28 08:25:13 -08:00
parent 82261a7df4
commit 188b3fd00d
1 changed files with 3 additions and 3 deletions

View File

@ -721,10 +721,10 @@ func (e *Engine) Create(config *ContainerConfig, name string, pullImage bool, au
e.RefreshVolumes()
e.RefreshNetworks()
e.RLock()
defer e.RUnlock()
e.Lock()
container := e.containers[id]
e.Unlock()
if container == nil {
err = errors.New("Container created but refresh didn't report it back")
}