mirror of
https://github.com/docker/cli.git
synced 2026-01-18 08:21:31 +03:00
fix incorrect ErrConnectFailed comparison
Signed-off-by: Reficul <xuzhenglun@gmail.com>
Upstream-commit: 14770269e8
Component: cli
This commit is contained in:
@@ -170,7 +170,7 @@ func getExecExitCode(ctx context.Context, client apiclient.ContainerAPIClient, e
|
||||
resp, err := client.ContainerExecInspect(ctx, execID)
|
||||
if err != nil {
|
||||
// If we can't connect, then the daemon probably died.
|
||||
if err != apiclient.ErrConnectionFailed {
|
||||
if !apiclient.IsErrConnectionFailed(err) {
|
||||
return false, -1, err
|
||||
}
|
||||
return false, -1, nil
|
||||
|
||||
@@ -91,7 +91,7 @@ func getExitCode(ctx context.Context, dockerCli *command.DockerCli, containerID
|
||||
c, err := dockerCli.Client().ContainerInspect(ctx, containerID)
|
||||
if err != nil {
|
||||
// If we can't connect, then the daemon probably died.
|
||||
if err != clientapi.ErrConnectionFailed {
|
||||
if !clientapi.IsErrConnectionFailed(err) {
|
||||
return false, -1, err
|
||||
}
|
||||
return false, -1, nil
|
||||
|
||||
Reference in New Issue
Block a user