Skip to content

Commit 5d39f6d

Browse files
author
Veetaha
committed
vscode: add on-success logic to dns resolution sanity check
1 parent fa7b91a commit 5d39f6d

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

editors/code/src/installation/language_server.ts

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -105,10 +105,13 @@ export async function ensureLanguageServerBinary(
105105
`GitHub repository: ${err.message}`
106106
);
107107

108-
dns.resolve('www.google.com').catch(err => {
109-
console.error("DNS resolution failed, there might be an issue with Internet availability");
110-
console.error(err);
111-
});
108+
dns.resolve('www.google.com').then(
109+
addrs => console.log("DNS resolution was successful", addrs),
110+
err => {
111+
console.error("DNS resolution failed, there might be an issue with Internet availability");
112+
console.error(err);
113+
}
114+
);
112115

113116
return null;
114117
}

0 commit comments

Comments
 (0)