Wrong async usage of doUntil.

This commit is contained in:
André Cruz
2013-05-09 21:15:49 +01:00
parent 423ce54d8a
commit 28780dc67e

View File

@@ -59,10 +59,12 @@ function lookup(name, options, callback) {
return next(createError('Response of request to "' + requestUrl + '" is not a valid json', 'EINVRES'));
}
callback(null, body.url);
url = body.url;
next();
});
}, function () {
return !url && current++ < total;
// Until the url is unknown or there's still registries to tests
return !!url || current++ < total;
}, function (err) {
// If some of the registry entries failed, error out
if (err) {