aboutsummaryrefslogtreecommitdiff
path: root/editors/code
diff options
context:
space:
mode:
authorbors[bot] <26634292+bors[bot]@users.noreply.github.com>2020-02-09 20:33:50 +0000
committerGitHub <[email protected]>2020-02-09 20:33:50 +0000
commitc48c0f370a6d02c7065864c8eb761cf9e4ba2363 (patch)
tree1437962de437c5aea09da788608fd25c49b2c750 /editors/code
parent2eb1c34f8501869ca83ec81f67db8bc0612f8d68 (diff)
parente709f113c107c75a7da86c39f6cdcb6d61dc360d (diff)
Merge #3072
3072: vscode: removed unnecessary awaits feature r=matklad a=Veetaha Found a feature that when the user has no internet connection the whole extension is blocked by waiting for the user to dismiss the error message and for making a sanity-check dns resolution. Co-authored-by: Veetaha <[email protected]>
Diffstat (limited to 'editors/code')
-rw-r--r--editors/code/src/installation/language_server.ts16
1 files changed, 11 insertions, 5 deletions
diff --git a/editors/code/src/installation/language_server.ts b/editors/code/src/installation/language_server.ts
index 1ce67b8b2..3510f9178 100644
--- a/editors/code/src/installation/language_server.ts
+++ b/editors/code/src/installation/language_server.ts
@@ -100,15 +100,21 @@ export async function ensureLanguageServerBinary(
100 try { 100 try {
101 await downloadLatestLanguageServer(langServerSource); 101 await downloadLatestLanguageServer(langServerSource);
102 } catch (err) { 102 } catch (err) {
103 await vscode.window.showErrorMessage( 103 vscode.window.showErrorMessage(
104 `Failed to download language server from ${langServerSource.repo.name} ` + 104 `Failed to download language server from ${langServerSource.repo.name} ` +
105 `GitHub repository: ${err.message}` 105 `GitHub repository: ${err.message}`
106 ); 106 );
107 107
108 await dns.resolve('www.google.com').catch(err => { 108 dns.resolve('example.com').then(
109 console.error("DNS resolution failed, there might be an issue with Internet availability"); 109 addrs => console.log("DNS resolution for example.com was successful", addrs),
110 console.error(err); 110 err => {
111 }); 111 console.error(
112 "DNS resolution for example.com failed, " +
113 "there might be an issue with Internet availability"
114 );
115 console.error(err);
116 }
117 );
112 118
113 return null; 119 return null;
114 } 120 }