Skip to content

Reject pending project requests when disposed#1345

Merged
TwitchBronBron merged 2 commits into
lsp-refactorfrom
better-dispose-handling
Nov 4, 2024
Merged

Reject pending project requests when disposed#1345
TwitchBronBron merged 2 commits into
lsp-refactorfrom
better-dispose-handling

Conversation

@TwitchBronBron

Copy link
Copy Markdown
Member

Fixes a bug in the language server rewrite where, if a project has a pending request (such as getCompletions or validate) and is disposed/destroyed before the request completes, the entire language server would hang indefinitely.

This fixes the issue by keeping track of every outgoing request. If the project is disposed, then all of those pending request promises will be rejected.

@TwitchBronBron
TwitchBronBron merged commit 99d1548 into lsp-refactor Nov 4, 2024
@TwitchBronBron
TwitchBronBron deleted the better-dispose-handling branch November 4, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant