Ah! TooManyParensException!


On Mon, Oct 21, 2013 at 2:41 PM, Dario Rexin <notifications@github.com>wrote:

> In project-code/app/org/graylog2/logback/appender/AccessLog.scala:
>
> > @@ -41,30 +41,30 @@ class AccessLog extends Filter {
> >    def logRequest(startTime: Long, request: RequestHeader, response: SimpleResult): SimpleResult = {
> >      val endTime: Long = System.currentTimeMillis()
> >
> > -    // TODO this can't be right.
> > -    val bytes: Array[Byte] = Await.result(response.body |>>> Iteratee.consume[Array[Byte]](), Duration.Inf)
> > -    val responseLength: Int = bytes.length
> > +    (response.body |>>> Iteratee.consume[Array[Byte]]()) foreach { bytes =>
>
> No, the foreach only executes the passed function once for the result of
> the future, so for each element in the future, which can only be one by
> definition ;-)
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/Graylog2/play2-graylog2/pull/7/files#r7092052>
> .
>