This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-08-12
Channels
- # aleph (3)
- # announcements (15)
- # architecture (6)
- # babashka (35)
- # babashka-sci-dev (10)
- # biff (5)
- # calva (9)
- # cherry (1)
- # cider (44)
- # clj-kondo (31)
- # cljfx (1)
- # clojure (108)
- # clojure-europe (32)
- # clojure-norway (12)
- # clojurescript (15)
- # conjure (3)
- # cursive (8)
- # datahike (1)
- # datalevin (19)
- # datascript (1)
- # datomic (59)
- # emacs (4)
- # graphql (3)
- # jobs (1)
- # luminus (6)
- # meander (9)
- # membrane (45)
- # nbb (67)
- # off-topic (16)
- # portal (3)
- # remote-jobs (1)
- # scittle (8)
- # shadow-cljs (46)
- # test-check (7)
- # tools-deps (5)
- # vim (63)
- # web-security (11)
- # xtdb (15)
Does aleph
server close the InputStream
s that it sends as responses?
Say, I have a reitit
route like this:
["/my/route"
{:get {;; a lot of stuff
:handler (function-that-returns-response-with-body-as-inputstream)}}]
The handler returns a response whose :body
is an InputStream
. Will aleph
call .close
on it after it's done streaming it out? Because I cannot close it while it is still being streamed, and I don't know when aleph
would be done with it. Or is there a post-processing callback that I can use? Or does aleph
guarantee that the stream will be closed (as I would expect when passing it on in this fashion)?➕ 1
Yes, Aleph closes it when done. See send-streaming-body
and byte-streams’ conversion-fn
for details
👍 2
Thanks for the confirmation!