From f1b0e07a8dbbb8edcc7b8a00aefc6edb8f6059b5 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Mon, 2 Nov 2026 10:47:17 +0000 Subject: [PATCH] :bug: Fix unbalanced parens in SSE response builder The conflict resolution combining the *sink* binding with the encode-fn negotiation dropped one closing paren, so the namespace did not compile. Restore the missing closer. AI-assisted-by: muse-spark-1.3-contributor --- backend/src/app/http/sse.clj | 33 ++++++++++++++++----------------- 1 file changed, 16 insertions(+), 17 deletions(-) diff --git a/backend/src/app/http/sse.clj b/backend/src/app/http/sse.clj index 652df1c678..296c753d9a 100644 --- a/backend/src/app/http/sse.clj +++ b/backend/src/app/http/sse.clj @@ -66,20 +66,19 @@ ::yres/status 200 ::yres/body (yres/stream-body (fn [_ output] - - (let [channel (sp/chan :buf buf :xf (keep (partial encode encode-fn))) - listener (events/spawn-listener - channel - (partial write! output) - (partial pu/close! output))] - (try - (binding [events/*sink* channel] - (try - (let [result (handler)] - (events/tap :end result)) - (catch Throwable cause - (let [result (errors/handle' cause request)] - (events/tap :error result))))) - (finally - (sp/close! channel) - (px/await! listener))))))})) + (let [channel (sp/chan :buf buf :xf (keep (partial encode encode-fn))) + listener (events/spawn-listener + channel + (partial write! output) + (partial pu/close! output))] + (try + (binding [events/*sink* channel] + (try + (let [result (handler)] + (events/tap :end result)) + (catch Throwable cause + (let [result (errors/handle' cause request)] + (events/tap :error result))))) + (finally + (sp/close! channel) + (px/await! listener))))))})))