Skip to content

Commit 0bd3e12

Browse files
fix(lsp): LSP download timeout message disappears too early (#7145)
## Problem: When downloading the LSP artifacts from the manifest, there are some large ones (100+ MB). For a slow connection this can take 1+ minutes, but our timeout for the "downloading" message is set to disappear much earlier. So it is still downloading in the background, but the message has disappeared and the user thinks that the download is done. ## Solution: Increase the timeout to 30 minutes, which will ensure the downloading message sticks around while the download is still happening. ## Additional In another commit this fixes a separate HTTP client bug where it would time out a request if it took longer than 3 seconds. This caused downloads to be aborted (separate from the download message disappearing). Now it times out after 30 minutes. --- - Treat all work as PUBLIC. Private `feature/x` branches will not be squash-merged at release time. - Your code changes must meet the guidelines in [CONTRIBUTING.md](https://github.com/aws/aws-toolkit-vscode/blob/master/CONTRIBUTING.md#guidelines). - License: I confirm that my contribution is made under the terms of the Apache 2.0 license. Signed-off-by: nkomonen-amazon <[email protected]>
1 parent 4ba5251 commit 0bd3e12

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/core/src/shared/lsp/lspResolver.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,11 @@ import { lspSetupStage, StageResolver, tryStageResolvers } from './utils/setupSt
1515
import { HttpResourceFetcher } from '../resourcefetcher/httpResourceFetcher'
1616
import { showMessageWithCancel } from '../../shared/utilities/messages'
1717
import { Timeout } from '../utilities/timeoutUtils'
18+
import { oneMinute } from '../datetime'
1819

19-
// max timeout for downloading remote LSP assets progress, the lowest possible is 3000, bounded by httpResourceFetcher's waitUntil
20-
const remoteDownloadTimeout = 5000
20+
// max timeout for downloading remote LSP assets. Some asserts are large (100+ MB) so this needs to be large for slow connections.
21+
// Since the user can cancel this one we can let it run very long.
22+
const remoteDownloadTimeout = oneMinute * 30
2123

2224
export class LanguageServerResolver {
2325
constructor(

0 commit comments

Comments
 (0)