Fork me on GitHub
#reitit
<
2019-09-13
>
ikitommi12:09:23

Thanks for the repro @thomas559. It seems to be issue in #aleph, which doesn’t seem to close the InputStreams properly. Tested with Jetty, which handled those ok. If you return (ByteArrayInputStream. (.getBytes ^String (json/write-str sample-map))) from handler2, it fails too on aleph

valerauko05:09:22

I'll look into this on the aleph end in october

ikitommi12:09:14

I have tried to push support of byte-arrays to all web servers, so we could change the default to :bytes. It’s much faster as there is no extra wrapping into Streams & the servers can use NIO for non-blocking send. Aleph at least supports that, so good for this case.

thomascothran13:09:35

@ikitommi - I guess the reason it hasn't come up is because most people using muuntaja with aleph are already defaulting to bytes. I came to reitit without having used muuntaja previously, so I've only thought about configuring it when I run into problems (eg customizing json key parsing). I've moved us over to using the bytes option now - it's really fast!

👍 4