-
Notifications
You must be signed in to change notification settings - Fork 29.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Retry connecting even if the initial connection fails #127565
Comments
One of the annoyances I have is all my open editors tabs are closed. I have to try and remember what editor tabs I had open which often leads to lost time and effort trying to recall. I did create a ticket #128890 for this, which is how I found this as it was suggested, Ideally, even if can't connect need the ability to save/restore the prior editor tabs that were open or currently opened. |
This can be verified running from source with the test resolver, using a change like the following: diff --git a/extensions/vscode-test-resolver/src/extension.ts b/extensions/vscode-test-resolver/src/extension.ts
index 05fd267d2bc..90eb17c62a8 100644
--- a/extensions/vscode-test-resolver/src/extension.ts
+++ b/extensions/vscode-test-resolver/src/extension.ts
@@ -264,7 +264,13 @@ export function activate(context: vscode.ExtensionContext) {
async getCanonicalURI(uri: vscode.Uri): Promise<vscode.Uri> {
return vscode.Uri.file(uri.path);
},
- resolve(_authority: string): Thenable<vscode.ResolvedAuthority> {
+ resolve(_authority: string, _context: vscode.RemoteAuthorityResolverContext): Thenable<vscode.ResolvedAuthority> {
+ if (_context.resolveAttempt <= 3) {
+ throw new Error(`FAILING ON resolveAttempt ${_context.resolveAttempt}`);
+ }
+ if (_context.resolveAttempt <= 4) {
+ return Promise.resolve({ host: '127.0.0.1', port: 8585, connectionToken: undefined });
+ }
return vscode.window.withProgress({
location: vscode.ProgressLocation.Notification,
title: 'Open TestResolver Remote ([details](command:vscode-testresolver.showLog))',
Then, run |
…d retry up to 5 times the initial connection
When connecting to a remote, if the initial connection fails, we will give up. The idea was that retrying would be useless, since the initial setup might have failed. But it is possible that perhaps it was an intermittent network error.
The text was updated successfully, but these errors were encountered: