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 9090 ; ; Chaining `(-> (p/deferred) (p/catch ...))` seems like it should work, but
9191 ; ; doesn't.
9292 (let [p (p/deferred )]
93+ ; ; side-effect of cancellation:
9394 (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})))
9797 (map->PendingRequest {:p p
9898 :id id
9999 :method method
221221 ; ; If the server blocks waiting for a response, we have to set aside
222222 ; ; the other inbound requests and notifications, so that we can get to
223223 ; ; 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.
229227
230228 ; ; To accomplish this we processes inbound requests and notifications
231229 ; ; separately from inbound responses. If the server starts blocking
You can’t perform that action at this time.
0 commit comments