diff --git a/app/org/elastic4play/database/DBConfiguration.scala b/app/org/elastic4play/database/DBConfiguration.scala index f243d6e..e95fb0e 100644 --- a/app/org/elastic4play/database/DBConfiguration.scala +++ b/app/org/elastic4play/database/DBConfiguration.scala @@ -70,7 +70,7 @@ class DBConfiguration( */ private[database] val client = TcpClient.transport( Settings.builder().put("cluster.name", searchCluster).build(), - ElasticsearchClientUri(searchHost.map(h ⇒ s"elasticsearch://$h").mkString(","))) + ElasticsearchClientUri(s"elasticsearch://${searchHost.mkString(",")}")) // when application close, close also ElasticSearch connection lifecycle.addStopHook { () ⇒ Future { client.close() } }