File tree Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Expand file tree Collapse file tree 3 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 265265 (async/>!! output-ch (internal-error-response resp req))))))
266266 (receive-notification [this context {:keys [method params] :as notif}]
267267 (let [now (.instant clock)]
268+ (some-> trace-ch (async/put! (trace/received-notification notif now)))
268269 (if (= method " $/cancelRequest" )
269270 (if-let [result-promise (get @pending-received-requests* (:id params))]
270271 (p/cancel! result-promise)
271272 (some-> trace-ch (async/put! (trace/received-unmatched-cancellation-notification notif now))))
272- (do
273- (some-> trace-ch (async/put! (trace/received-notification notif now)))
274- (let [result (receive-notification method context params)]
275- (when (identical? ::method-not-found result)
276- (protocols.endpoint/log this :warn " received unexpected notification" method))))))))
273+ (let [result (receive-notification method context params)]
274+ (when (identical? ::method-not-found result)
275+ (protocols.endpoint/log this :warn " received unexpected notification" method)))))))
277276
278277(defn chan-server
279278 [{:keys [output-ch input-ch log-ch trace? trace-ch clock on-close]
Original file line number Diff line number Diff line change 5959 (format-body " Body" resp)))
6060
6161(defn received-unmatched-cancellation-notification [notif at]
62- (format-trace at " Received" " cancellation notification" " for unmatched request: "
62+ (format-trace at " Received" " cancellation notification" ( format " for unmatched request (%s): " ( :id ( :params notif)))
6363 (format-params notif)))
6464
6565(defn sending-notification [notif at] (format-notification " Sending" notif at))
Original file line number Diff line number Diff line change 387387 trace-ch (:trace-ch server)]
388388 (server/start server nil )
389389 (async/put! input-ch (lsp.requests/notification " $/cancelRequest" {:id 1 }))
390- (is (= (trace-log [" [Trace - 2022-03-05T13:35:23Z] Received cancellation notification for unmatched request:"
390+ (h/assert-take trace-ch) ; ; trace of Received notification '$/cancelRequest'
391+ (is (= (trace-log [" [Trace - 2022-03-05T13:35:23Z] Received cancellation notification for unmatched request (1):"
391392 " Params: {"
392393 " \" id\" : 1"
393394 " }" ])
You can’t perform that action at this time.
0 commit comments