File tree 1 file changed +4
-7
lines changed
1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -11,9 +11,6 @@ import { Settings, validateCwdSetting } from "./settings";
11
11
import utils = require( "./utils" ) ;
12
12
13
13
export class PowerShellProcess {
14
- // This is used to warn the user that the extension is taking longer than expected to startup.
15
- private static warnUserThreshold = 30 ;
16
-
17
14
private static title = "PowerShell Extension" ;
18
15
19
16
public onExited : vscode . Event < void > ;
@@ -282,9 +279,9 @@ export class PowerShellProcess {
282
279
private async waitForSessionFile (
283
280
cancellationToken : vscode . CancellationToken ,
284
281
) : Promise < IEditorServicesSessionDetails | undefined > {
285
- const numOfTries =
286
- this . sessionSettings . developer . waitForSessionFileTimeoutSeconds ;
287
- const warnAt = numOfTries - PowerShellProcess . warnUserThreshold ;
282
+ const numOfTries = // We sleep for 1/5 of a second each try
283
+ 5 * this . sessionSettings . developer . waitForSessionFileTimeoutSeconds ;
284
+ const warnAt = numOfTries - 5 * 30 ; // Warn at 30 seconds
288
285
289
286
// Check every second.
290
287
this . logger . writeDebug (
@@ -314,7 +311,7 @@ export class PowerShellProcess {
314
311
) ;
315
312
}
316
313
317
- // Wait a bit and try again.
314
+ // Wait 1/5 of a second and try again
318
315
await utils . sleep ( 200 ) ;
319
316
}
320
317
You can’t perform that action at this time.
0 commit comments