Skip to content

Commit

Permalink
ensureEval for response streaming
Browse files Browse the repository at this point in the history
  • Loading branch information
sergeykolbasov committed Aug 22, 2017
1 parent e7e8976 commit f7b62d3
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion iteratee/src/main/scala/io/finch/iteratee/package.scala
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ trait LowPriorityInstances extends FutureModule {
response.setChunked(true)
response.contentType = w.value
val writer = response.writer
enum.map(e.apply(_, cs)).into(iteratee(writer)).ensure(writer.close())
enum.ensureEval(Eval.later(writer.close())).map(e.apply(_, cs)).into(iteratee(writer))
response
})
}
Expand Down

0 comments on commit f7b62d3

Please sign in to comment.