File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -617,8 +617,12 @@ extension SourceKitLSPServer: MessageHandler {
617
617
// See comment in `withLoggingScope`.
618
618
// The last 2 digits should be sufficient to differentiate between multiple concurrently running requests.
619
619
await withLoggingScope ( " request- \( id. numericValue % 100 ) " ) {
620
- await self . handleImpl ( params, id: id, reply: reply)
621
- signposter. endInterval ( " Request " , state, " Done " )
620
+ await withTaskCancellationHandler {
621
+ await self . handleImpl ( params, id: id, reply: reply)
622
+ signposter. endInterval ( " Request " , state, " Done " )
623
+ } onCancel: {
624
+ signposter. emitEvent ( " Cancelled " , id: signpostID)
625
+ }
622
626
}
623
627
// We have handled the request and can't cancel it anymore.
624
628
// Stop keeping track of it to free the memory.
You can’t perform that action at this time.
0 commit comments