vscode: add on-success logic to dns resolution sanity check

This commit is contained in:
Veetaha 2020-02-09 22:00:33 +02:00
parent fa7b91a2f7
commit 5d39f6d3b2

View file

@ -105,10 +105,13 @@ export async function ensureLanguageServerBinary(
`GitHub repository: ${err.message}`
);
dns.resolve('www.google.com').catch(err => {
console.error("DNS resolution failed, there might be an issue with Internet availability");
console.error(err);
});
dns.resolve('www.google.com').then(
addrs => console.log("DNS resolution was successful", addrs),
err => {
console.error("DNS resolution failed, there might be an issue with Internet availability");
console.error(err);
}
);
return null;
}