https://kotlinlang.org logo
Title
j

Jose A.

10/01/2021, 1:15 PM
Hi! I'm trying to respond to a get query like this:
call.respondBytesWriter {
    jobOutputRepository.get(id, subId).collect { writeFully("$it\n".toByteArray()) }
}
But with curl I'm getting
curl: (18) transfer closed with outstanding read data remaining
I tried to add a
flush()
but I got the same error. Any ideas?
a

Aleksei Tirman [JB]

10/11/2021, 4:58 PM
Could you please share a definition for
jobOutputRepository.get
if your problem is still relevant?
j

Jose A.

10/13/2021, 7:16 AM
Thanks Aleksei! It was my code not ktor. It was throwing an Exception so the data was interrupted.