tysonnorris commented on a change in pull request #3812: ContainerClient + akka 
http alternative to HttpUtils
URL: 
https://github.com/apache/incubator-openwhisk/pull/3812#discussion_r203930332
 
 

 ##########
 File path: common/scala/src/main/scala/whisk/http/PoolingRestClient.scala
 ##########
 @@ -43,18 +44,24 @@ class PoolingRestClient(
   host: String,
   port: Int,
   queueSize: Int,
-  httpFlow: Option[Flow[(HttpRequest, Promise[HttpResponse]), 
(Try[HttpResponse], Promise[HttpResponse]), Any]] = None)(
-  implicit system: ActorSystem) {
+  httpFlow: Option[Flow[(HttpRequest, Promise[HttpResponse]), 
(Try[HttpResponse], Promise[HttpResponse]), Any]] = None,
+  timeout: Option[FiniteDuration] = None)(implicit system: ActorSystem) {
   require(protocol == "http" || protocol == "https", "Protocol must be one of 
{ http, https }.")
 
   protected implicit val context: ExecutionContext = system.dispatcher
   protected implicit val materializer: ActorMaterializer = ActorMaterializer()
 
+  //if specified, override the ClientConnection idle-timeout value
+  private val timeoutSettings = {
+    val ps = ConnectionPoolSettings(system.settings.config)
+    timeout.map(t => 
ps.withUpdatedConnectionSettings(_.withIdleTimeout(t))).getOrElse(ps)
+  }
 
 Review comment:
   Thanks @chetanmeh !

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to