File tree Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Expand file tree Collapse file tree 1 file changed +6
-8
lines changed Original file line number Diff line number Diff line change 90
90
; ; Chaining `(-> (p/deferred) (p/catch ...))` seems like it should work, but
91
91
; ; doesn't.
92
92
(let [p (p/deferred )]
93
+ ; ; side-effect of cancellation:
93
94
(p/catch p CancellationException
94
- (fn [ex]
95
- (protocols.endpoint/send-notification server " $/cancelRequest" {:id id})
96
- (p/rejected ex)))
95
+ (fn [_]
96
+ (protocols.endpoint/send-notification server " $/cancelRequest" {:id id})))
97
97
(map->PendingRequest {:p p
98
98
:id id
99
99
:method method
221
221
; ; If the server blocks waiting for a response, we have to set aside
222
222
; ; the other inbound requests and notifications, so that we can get to
223
223
; ; the response. That is, while the server is blocking we cannot stop
224
- ; ; reading input. Otherwise, the server will end up in a deadlock,
225
- ; ; where it's waiting to receive a response off the input-ch but new
226
- ; ; messages aren't being put on the input-ch because the server is
227
- ; ; blocked. See
228
- ; ; https://github.com/clojure-lsp/clojure-lsp/issues/1500.
224
+ ; ; accepting input. Otherwise, the server will end up in a deadlock,
225
+ ; ; where it's waiting to receive a response, but the response is
226
+ ; ; waiting to be accepted.
229
227
230
228
; ; To accomplish this we processes inbound requests and notifications
231
229
; ; separately from inbound responses. If the server starts blocking
You can’t perform that action at this time.
0 commit comments