Skip to content

Commit

Permalink
do not unmap ports when unbinding container from network
Browse files Browse the repository at this point in the history
  • Loading branch information
chengwang86 committed Sep 5, 2017
1 parent ed83a19 commit 578da0a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions lib/apiservers/engine/backends/container_proxy.go
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,11 @@ func (c *ContainerProxy) Stop(vc *viccontainer.VicContainer, name string, second
if err != nil {
return err
}

// unmap ports
if err = UnmapPorts(vc.HostConfig); err != nil {
return err
}
}

// change the state of the container
Expand Down Expand Up @@ -840,10 +845,6 @@ func (c *ContainerProxy) UnbindContainerFromNetwork(vc *viccontainer.VicContaine
handle = ub.Payload.Handle
}

// unmap ports
if err = UnmapPorts(vc.HostConfig); err != nil {
return "", err
}
return handle, nil
}

Expand Down

0 comments on commit 578da0a

Please sign in to comment.