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

Avoid returning responses for cancelled requests #3021

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

vinistock
Copy link
Member

@vinistock vinistock commented Jan 7, 2025

Motivation

Closes #3019

Based on the problem reported, some clients will retry requests that they themselves requested cancellation for. The specification has no mention of this and no guidance about what to do.

Rust Analyzer had the same issue, so I tried to follow their fix, which is apparently to completely ignore requests that were already cancelled.

This looks weird to me since the spec mentions cancelled requests should still return something. But maybe it's talking only about the first instance of the cancelled request and not retries?

Implementation

If my understanding is correct, Rust Analyzer's fix was to not return anything to the client when receiving a retry of a cancelled request. This PR does the same.

Automated Tests

Added a test.

Copy link
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@vinistock vinistock added server This pull request should be included in the server gem's release notes bugfix This PR will fix an existing bug labels Jan 7, 2025 — with Graphite App
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bugfix This PR will fix an existing bug server This pull request should be included in the server gem's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Version 0.23 breaks NeoVim integration
1 participant