Skip to content

Commit

Permalink
Don't fall through
Browse files Browse the repository at this point in the history
  • Loading branch information
dadgar committed Jan 28, 2019
1 parent ec57123 commit 4acaf27
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions drivers/docker/handle.go
Original file line number Diff line number Diff line change
Expand Up @@ -136,14 +136,14 @@ func (h *taskHandle) Kill(killTimeout time.Duration, signal os.Signal) error {
return nil
}

// Drop through to just attempting to stop the container
h.logger.Error("failed to signal container while killing", "error", err)
} else {
select {
case <-h.waitCh:
return nil
case <-time.After(killTimeout):
}
return fmt.Errorf("Failed to signal container %q while killing: %v", h.containerID, err)
}

select {
case <-h.waitCh:
return nil
case <-time.After(killTimeout):
}
}

Expand All @@ -165,6 +165,7 @@ func (h *taskHandle) Kill(killTimeout time.Duration, signal os.Signal) error {
h.logger.Error("failed to stop container", "error", err)
return fmt.Errorf("Failed to stop container %s: %s", h.containerID, err)
}

h.logger.Info("stopped container")
return nil
}
Expand Down

0 comments on commit 4acaf27

Please sign in to comment.