diff --git a/pekko-http-argonaut/src/main/scala/com/github/pjfanning/pekkohttpargonaut/ArgonautSupport.scala b/pekko-http-argonaut/src/main/scala/com/github/pjfanning/pekkohttpargonaut/ArgonautSupport.scala index 30a3419..3c9febe 100644 --- a/pekko-http-argonaut/src/main/scala/com/github/pjfanning/pekkohttpargonaut/ArgonautSupport.scala +++ b/pekko-http-argonaut/src/main/scala/com/github/pjfanning/pekkohttpargonaut/ArgonautSupport.scala @@ -146,7 +146,7 @@ trait ArgonautSupport { * unmarshaller for any `A` value */ implicit def fromByteStringUnmarshaller[A: DecodeJson]: Unmarshaller[ByteString, A] = - Unmarshaller(_ => bs => Future.successful(decode(parse(bs.utf8String)))) + Unmarshaller(ec => bs => Future(decode(parse(bs.utf8String)))(ec)) /** * HTTP entity => `Source[A, _]` diff --git a/pekko-http-jackson/src/main/scala/com/github/pjfanning/pekkohttpjackson/JacksonSupport.scala b/pekko-http-jackson/src/main/scala/com/github/pjfanning/pekkohttpjackson/JacksonSupport.scala index aece897..fea481f 100644 --- a/pekko-http-jackson/src/main/scala/com/github/pjfanning/pekkohttpjackson/JacksonSupport.scala +++ b/pekko-http-jackson/src/main/scala/com/github/pjfanning/pekkohttpjackson/JacksonSupport.scala @@ -247,7 +247,7 @@ trait JacksonSupport { def unordered = Flow[ByteString].mapAsyncUnordered(support.parallelism)(asyncParse) - FastFuture.successful { + Future.successful { entity.dataBytes .via(support.framingDecoder) .via(if (support.unordered) unordered else ordered)