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 225
225
notif (lsp.requests/notification method body)]
226
226
(trace this trace/sending-notification notif now)
227
227
; ; 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 ))
229
230
(receive-response [this {:keys [id error result] :as resp}]
230
231
(let [now (.instant clock)
231
232
[pending-requests _] (swap-vals! pending-sent-requests* dissoc id)]
Original file line number Diff line number Diff line change 124
124
(h/assert-take output-ch)))
125
125
(server/shutdown server)))
126
126
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
+
127
136
(deftest should-cancel-request-when-cancellation-notification-receieved
128
137
(let [input-ch (async/chan 3 )
129
138
output-ch (async/chan 3 )
You can’t perform that action at this time.
0 commit comments