From 26e24981a6a9cb89da62e3f27dd56458053d9376 Mon Sep 17 00:00:00 2001 From: "matthew.conway" Date: Fri, 3 Nov 2017 16:25:44 -0400 Subject: [PATCH] make client val lazy to allow Client to be extended --- build.sbt | 2 +- featherbed-core/src/main/scala/featherbed/Client.scala | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index c8523a4..1343cea 100644 --- a/build.sbt +++ b/build.sbt @@ -7,7 +7,7 @@ enablePlugins(TutPlugin) lazy val buildSettings = Seq( organization := "io.github.finagle", - version := "0.3.1", + version := "0.3.2-SNAPSHOT", scalaVersion := "2.12.2", crossScalaVersions := Seq("2.11.11", "2.12.2") ) diff --git a/featherbed-core/src/main/scala/featherbed/Client.scala b/featherbed-core/src/main/scala/featherbed/Client.scala index ad6162e..a01fabb 100644 --- a/featherbed-core/src/main/scala/featherbed/Client.scala +++ b/featherbed-core/src/main/scala/featherbed/Client.scala @@ -80,9 +80,9 @@ class Client( protected def serviceTransform(service: Service[Request, Response]): Service[Request, Response] = service - protected val client = clientTransform(Client.forUrl(baseUrl)) + protected lazy val client = clientTransform(Client.forUrl(baseUrl)) - protected[featherbed] val httpClient = serviceTransform(client.newService(Client.hostAndPort(baseUrl))) + protected[featherbed] lazy val httpClient = serviceTransform(client.newService(Client.hostAndPort(baseUrl))) } object Client {