Skip to content

Commit 2e8f9fc

Browse files
committed
Check for channel closing if events source closes before done event.
1 parent 3025bf3 commit 2e8f9fc

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/wkok/openai_clojure/sse.clj

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
(when on-next
1616
(a/go
1717
(loop []
18-
(let [event (a/<! events)]
18+
(when-let [event (a/<! events)]
1919
(when (not= :done event)
2020
(on-next event)
2121
(recur)))))))

0 commit comments

Comments
 (0)