mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Fix race in get/set HostConfig
Docker-DCO-1.1-Signed-off-by: Alexandr Morozov <lk4d4math@gmail.com> (github: LK4D4)
This commit is contained in:
parent
0b3fe55442
commit
fa7c8d523e
1 changed files with 6 additions and 1 deletions
|
@ -808,11 +808,16 @@ func (container *Container) GetPtyMaster() (*os.File, error) {
|
|||
}
|
||||
|
||||
func (container *Container) HostConfig() *runconfig.HostConfig {
|
||||
return container.hostConfig
|
||||
container.Lock()
|
||||
res := container.hostConfig
|
||||
container.Unlock()
|
||||
return res
|
||||
}
|
||||
|
||||
func (container *Container) SetHostConfig(hostConfig *runconfig.HostConfig) {
|
||||
container.Lock()
|
||||
container.hostConfig = hostConfig
|
||||
container.Unlock()
|
||||
}
|
||||
|
||||
func (container *Container) DisableLink(name string) {
|
||||
|
|
Loading…
Reference in a new issue