Open diegossilveira opened 8 years ago
Yeah, I would expect that too. I'll have a look at this on the weekend.
Hi @diegossilveira – OK, this is slightly tricky (and sorry to have taken so long to respond). The explanation for this (odd) result is that the stream is closing before the server can respond. It's closing because the end of the request stream is interpreted by the server as a close initiated by the client.
If you change your request to
val p = new Promise[AsyncStream[Frame]]
val frames = AsyncStream.flatten(AsyncStream.fromFuture(p))
val req = Request(new URI("/"), Map.empty, null, frames)
you will see the "again". However, this presents another problem: the client request needs to close eventually. Something must call p.setValue(AsyncStream.empty)
.
I'm making some experiments with finagle-websocket module. I would like the server to reply frames that it currently does not have, represented by Futures.
The code above illustrates my question:
The expected output is:
But all I get is:
Am I missing something?