Skip to content

Commit

Permalink
integration: don't error if connection already closed with dockerd wo…
Browse files Browse the repository at this point in the history
…rker

Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
  • Loading branch information
crazy-max committed Mar 27, 2022
1 parent 812c403 commit 9a4fe5e
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion util/testutil/integration/dockerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (
"os/exec"
"path/filepath"
"strings"
"syscall"
"testing"
"time"

Expand Down Expand Up @@ -143,7 +144,11 @@ func (c dockerd) New(ctx context.Context, cfg *BackendConfig) (b Backend, cl fun
}
conn, err := dockerAPI.DialHijack(ctx, "/grpc", "h2c", nil)
if err != nil {
return errors.Wrapf(err, "dockerd grpc conn error: %s", formatLogs(cfg.Logs))
if errors.Is(err, syscall.ECONNRESET) || errors.Is(err, net.ErrClosed) {
logrus.Warn("dockerd conn already closed: ", err)
return nil
}
return errors.Wrap(err, "dockerd grpc conn error")
}

proxyGroup.Go(func() error {
Expand Down

0 comments on commit 9a4fe5e

Please sign in to comment.