We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 9339104 + 19ecd49 commit 86442dfCopy full SHA for 86442df
1 file changed
cmd/ctr/commands/client.go
@@ -47,6 +47,8 @@ func AppContext(context *cli.Context) (gocontext.Context, gocontext.CancelFunc)
47
48
// NewClient returns a new containerd client
49
func NewClient(context *cli.Context, opts ...containerd.ClientOpt) (*containerd.Client, gocontext.Context, gocontext.CancelFunc, error) {
50
+ timeoutOpt := containerd.WithTimeout(context.GlobalDuration("connect-timeout"))
51
+ opts = append(opts, timeoutOpt)
52
client, err := containerd.New(context.GlobalString("address"), opts...)
53
if err != nil {
54
return nil, nil, nil, err
0 commit comments