fixup! refactor(container): restart handling
This commit is contained in:
parent
7242534a10
commit
a74a2c7819
@ -243,6 +243,7 @@ func (a *Client) RunContainer(ctx context.Context, params RunContainerParams) (<
|
||||
|
||||
a.runContainerLoop(
|
||||
ctx,
|
||||
cancel,
|
||||
createResp.ID,
|
||||
params.ContainerConfig.Image,
|
||||
params.NetworkCountConfig,
|
||||
@ -329,6 +330,7 @@ func (a *Client) pullImageIfNeeded(ctx context.Context, imageName string, contai
|
||||
// when the container exits.
|
||||
func (a *Client) runContainerLoop(
|
||||
ctx context.Context,
|
||||
cancel context.CancelFunc,
|
||||
containerID string,
|
||||
imageName string,
|
||||
networkCountConfig NetworkCountConfig,
|
||||
@ -336,6 +338,8 @@ func (a *Client) runContainerLoop(
|
||||
stateC chan<- domain.Container,
|
||||
errC chan<- error,
|
||||
) {
|
||||
defer cancel()
|
||||
|
||||
type containerWaitResponse struct {
|
||||
container.WaitResponse
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user