Skip to content
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

Prevent panic when handling an LSP response with no request #2475

Conversation

the-mikedavis
Copy link
Member

A language server may push a response which doesn't belong to any
request. With this change, we discard the response rather than
crashing.

In the case of #2474, the language server sends an error message
with a null request ID which should not ever exist in the
pending_requests HashMap.

closes #2474

A language server may push a response which doesn't belong to any
request. With this change, we discard the response rather than
crashing.

In the case of helix-editor#2474, the language server sends an error message
with a null request ID which should not ever exist in the
`pending_requests` HashMap.

closes helix-editor#2474
@the-mikedavis the-mikedavis force-pushed the md-prevent-panic-on-missing-pending-request branch from ecd9eb7 to 4bb33e1 Compare May 16, 2022 12:34
@the-mikedavis the-mikedavis mentioned this pull request May 16, 2022
@archseer archseer merged commit 50dd119 into helix-editor:master May 17, 2022
@the-mikedavis the-mikedavis deleted the md-prevent-panic-on-missing-pending-request branch May 22, 2022 01:59
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 15, 2022
…itor#2475)

A language server may push a response which doesn't belong to any
request. With this change, we discard the response rather than
crashing.

In the case of helix-editor#2474, the language server sends an error message
with a null request ID which should not ever exist in the
`pending_requests` HashMap.

closes helix-editor#2474
mtoohey31 pushed a commit to mtoohey31/helix that referenced this pull request Jun 15, 2022
…itor#2475)

A language server may push a response which doesn't belong to any
request. With this change, we discard the response rather than
crashing.

In the case of helix-editor#2474, the language server sends an error message
with a null request ID which should not ever exist in the
`pending_requests` HashMap.

closes helix-editor#2474
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.

Crash opening a non-existent Erlang file with ErlangLS
4 participants