mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Add a nil check for sandbox.osSbox
Signed-off-by: Santhosh Manohar <santhosh@docker.com>
This commit is contained in:
parent
6ab880f3b7
commit
d07d6814f3
1 changed files with 7 additions and 1 deletions
|
@ -427,7 +427,13 @@ func (sb *sandbox) ResolveIP(ip string) string {
|
|||
}
|
||||
|
||||
func (sb *sandbox) ExecFunc(f func()) error {
|
||||
return sb.osSbox.InvokeFunc(f)
|
||||
sb.Lock()
|
||||
osSbox := sb.osSbox
|
||||
sb.Unlock()
|
||||
if osSbox != nil {
|
||||
return osSbox.InvokeFunc(f)
|
||||
}
|
||||
return fmt.Errorf("osl sandbox unavailable in ExecFunc for %v", sb.ContainerID())
|
||||
}
|
||||
|
||||
func (sb *sandbox) ResolveService(name string) ([]*net.SRV, []net.IP) {
|
||||
|
|
Loading…
Reference in a new issue