Skip to content

Commit 0bd5350

Browse files
authored
Fix hang due to config provider timeout (#13909)
1 parent d0e089c commit 0bd5350

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

Extension/src/LanguageServer/client.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2284,9 +2284,12 @@ export class DefaultClient implements Client {
22842284
message += ` (${err})`;
22852285
}
22862286

2287-
if (await vscode.window.showInformationMessage(message, dismiss, disable) === disable) {
2288-
settings.toggleSetting("configurationWarnings", "enabled", "disabled");
2289-
}
2287+
// Do not await here, as that would prevent the function from returning until the user dismisses the message.
2288+
void vscode.window.showInformationMessage(message, dismiss, disable).then(result => {
2289+
if (result === disable) {
2290+
settings.toggleSetting("configurationWarnings", "enabled", "disabled");
2291+
}
2292+
});
22902293
}
22912294
}
22922295
return result;

0 commit comments

Comments
 (0)