diff --git a/squbs-unicomplex/src/main/resources/reference.conf b/squbs-unicomplex/src/main/resources/reference.conf index 075263a7c..fc58d4525 100644 --- a/squbs-unicomplex/src/main/resources/reference.conf +++ b/squbs-unicomplex/src/main/resources/reference.conf @@ -17,8 +17,7 @@ squbs { # besides this file name list external-config-files = [] - # Timeouts for the service-infra startup applies to both the wait time for a response from each listener and the - # overall time it takes for all listeners to start. + # Service infra configuration. service-infra { # Maximum amount of time to wait for all listeners to be started. timeout = 60s diff --git a/squbs-unicomplex/src/main/scala/org/squbs/unicomplex/UnicomplexBoot.scala b/squbs-unicomplex/src/main/scala/org/squbs/unicomplex/UnicomplexBoot.scala index 57dfd6bd6..c4b0dc760 100644 --- a/squbs-unicomplex/src/main/scala/org/squbs/unicomplex/UnicomplexBoot.scala +++ b/squbs-unicomplex/src/main/scala/org/squbs/unicomplex/UnicomplexBoot.scala @@ -464,10 +464,10 @@ object UnicomplexBoot extends LazyLogging { def getTimeout(keyRelPath: String): Option[Timeout] = { val key = s"squbs.service-infra.$keyRelPath" val timeoutDuration = actorSystem.settings.config.getOptionalDuration(key) - timeoutDuration.foreach { to => - require(to.toMillis > 0, s"The config property, $key, must be greater than 0 milliseconds.") + timeoutDuration.map { d => + require(d.toMillis > 0, s"The config property, $key, must be greater than 0 milliseconds.") + Timeout(d) } - timeoutDuration.map { d => Timeout(d) } } val overallTimeout = getTimeout("timeout").getOrElse(Timeout(60.seconds))