We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4e8110f commit fd2c1a8Copy full SHA for fd2c1a8
src/languageClient.ts
@@ -141,13 +141,14 @@ export class LanguageClientManager implements LanguageClient {
141
public async start (): Promise<void> {
142
let started = false
143
let attempt = 0
144
+ const maxStartAttemptCount = this.managerOptions.maxStartAttemptCount
145
while (
146
!this.isDisposed() &&
- !started && (
147
- this.managerOptions.maxStartAttemptCount == null ||
148
- attempt < this.managerOptions.maxStartAttemptCount
149
- )
+ !started
150
) {
+ if (maxStartAttemptCount != null && attempt >= maxStartAttemptCount) {
+ throw new Error(`Max connection attempt count exceeded: ${maxStartAttemptCount}`)
151
+ }
152
try {
153
this.startPromise = this._start()
154
await this.startPromise
0 commit comments