mirror of
https://github.com/apple/sourcekit-lsp.git
synced 2026-03-02 18:23:24 +01:00
Clear inProgressTextDocumentRequests on textDocumentTrackingQueue
`inProgressTextDocumentRequests` is supposed to only be accessed on `textDocumentTrackingQueue` but we were accessing it outside of that queue. Because of this, we might try to remove requests from `inProgressTextDocumentRequests` before adding them, which would cause them to stay in the list indefinitely.
This commit is contained in:
@@ -654,7 +654,9 @@ extension SourceKitLSPServer: QueueBasedMessageHandler {
|
||||
) async {
|
||||
defer {
|
||||
if let request = params as? any TextDocumentRequest {
|
||||
self.inProgressTextDocumentRequests[request.textDocument.uri, default: []].removeAll { $0.id == id }
|
||||
textDocumentTrackingQueue.async(priority: .background) {
|
||||
self.inProgressTextDocumentRequests[request.textDocument.uri, default: []].removeAll { $0.id == id }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user