How to handle response timeout?
问题 In akka-http routing I can return Future as a response that implicitly converts to ToResponseMarshaller . Is there some way to handle timeout of this future? Or timeout of connection in route level? Or one way is to use Await() function? Right now client can wait response forever. complete { val future = for { response <- someIOFunc() entity <- someOtherFunc() } yield entity future.onComplete({ case Success(result) => HttpResponse(entity = HttpEntity(MediaTypes.`text/xml`, result)) case