From 3f3172f2d7681264d50a7fe10948516bc6a20e7e Mon Sep 17 00:00:00 2001 From: jczuchnowski Date: Mon, 17 Aug 2020 21:21:48 +0200 Subject: [PATCH] Update akka-http to 10.2.0 --- build.sbt | 2 +- src/main/scala/akka/http/interop/HttpServer.scala | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 74b4869..0f6165c 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ import ReleasePlugin.autoImport._ val zioVersion = "1.0.0" val akkaVersion = "2.6.8" -val akkaHttpVersion = "10.1.12" +val akkaHttpVersion = "10.2.0" val compilerOptions = Seq( "-deprecation", diff --git a/src/main/scala/akka/http/interop/HttpServer.scala b/src/main/scala/akka/http/interop/HttpServer.scala index d87cc63..d23e3c1 100644 --- a/src/main/scala/akka/http/interop/HttpServer.scala +++ b/src/main/scala/akka/http/interop/HttpServer.scala @@ -17,7 +17,7 @@ object HttpServer { implicit val system: ActorSystem = sys val start: Managed[Throwable, Http.ServerBinding] = - ZManaged.make(ZIO.fromFuture(_ => Http().bindAndHandle(routes, cfg.host, cfg.port)))(b => + ZManaged.make(ZIO.fromFuture(_ => Http().newServerAt(cfg.host, cfg.port).bind(routes)))(b => ZIO.fromFuture(_ => b.unbind()).orDie ) }