mirror of
https://github.com/penpot/penpot.git
synced 2026-11-03 16:40:44 +00:00
🐛 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
This commit is contained in:
parent
fb35c515a4
commit
f1b0e07a8d
@ -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))))))})))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user