File tree Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Expand file tree Collapse file tree 2 files changed +11
-1
lines changed Original file line number Diff line number Diff line change 225225 notif (lsp.requests/notification method body)]
226226 (trace this trace/sending-notification notif now)
227227 ; ; respect back pressure from clients that are slow to read; (go (>!)) will not suffice
228- (async/>!! output-ch notif)))
228+ (async/>!! output-ch notif)
229+ nil ))
229230 (receive-response [this {:keys [id error result] :as resp}]
230231 (let [now (.instant clock)
231232 [pending-requests _] (swap-vals! pending-sent-requests* dissoc id)]
Original file line number Diff line number Diff line change 124124 (h/assert-take output-ch)))
125125 (server/shutdown server)))
126126
127+ (deftest should-return-nil-after-sending-notifications
128+ (let [input-ch (async/chan 3 )
129+ output-ch (async/chan 3 )
130+ server (server/chan-server {:output-ch output-ch
131+ :input-ch input-ch})]
132+ (server/start server nil )
133+ (is (nil? (server/send-notification server " req" {:body " foo" })))
134+ (server/shutdown server)))
135+
127136(deftest should-cancel-request-when-cancellation-notification-receieved
128137 (let [input-ch (async/chan 3 )
129138 output-ch (async/chan 3 )
You can’t perform that action at this time.
0 commit comments