mirror of
https://github.com/rust-lang/rust-analyzer
synced 2025-01-13 13:48:50 +00:00
vscode: add on-success logic to dns resolution sanity check
This commit is contained in:
parent
fa7b91a2f7
commit
5d39f6d3b2
1 changed files with 7 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue