mirror of
https://github.com/containers/podman.git
synced 2025-06-23 02:18:13 +08:00
Merge pull request #5052 from mheon/cleanup_net_on_restart
Tear down network when restarting containers
This commit is contained in:
@ -1254,6 +1254,12 @@ func (c *Container) restartWithTimeout(ctx context.Context, timeout uint) (err e
|
||||
}
|
||||
}
|
||||
}
|
||||
// Ensure we tear down the container network so it will be
|
||||
// recreated - otherwise, behavior of restart differs from stop
|
||||
// and start
|
||||
if err := c.cleanupNetwork(); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
defer func() {
|
||||
if err != nil {
|
||||
|
Reference in New Issue
Block a user