diff --git a/libcontainerd/client_daemon.go b/libcontainerd/client_daemon.go index 7508968fd5..0c0939df10 100644 --- a/libcontainerd/client_daemon.go +++ b/libcontainerd/client_daemon.go @@ -147,7 +147,7 @@ func (c *client) Restore(ctx context.Context, id string, attachStdio StdioCallba rio, err = attachStdio(io) return rio, err }) - if err != nil && !strings.Contains(err.Error(), "no running task found") { + if err != nil && !errdefs.IsNotFound(errors.Cause(err)) { return false, -1, err }