In the reader I'm able to read all the element send
def fromReader(reader: Reader): AsyncStream[Buf] =
AsyncStream.fromFuture(reader.read(Int.MaxValue)).flatMap {
case None =>
AsyncStream.empty
case Some(buf) =>
println(buf)
buf +:: fromReader(reader)
}
BUT if I remove the thread.sleep(500) in the Server for each write, I can only see in the client that the first number is printed, but no more elements are read.
Somehow I think the emission of elements are just read in one reader.read getting the first element, and the rest is discarded.
Any idea how to configure the client/server to avoid that?
Hi all,
I'm using version 18.2.0 of Finagle.
Having a Server configure for streaming
When I write in the
Writable
with a delay between every writeIn the reader I'm able to read all the element send
BUT if I remove the
thread.sleep(500)
in the Server for each write, I can only see in the client that the first number is printed, but no more elements are read.Somehow I think the emission of elements are just read in one reader.read getting the first element, and the rest is discarded.
Any idea how to configure the client/server to avoid that?