Skip to content

Commit

Permalink
#38 Fix ES client settings when multiple nodes is configured
Browse files Browse the repository at this point in the history
  • Loading branch information
To-om committed Dec 7, 2017
1 parent c818bfc commit 56948b5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/org/elastic4play/database/DBConfiguration.scala
Original file line number Diff line number Diff line change
Expand Up @@ -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() } }

Expand Down

0 comments on commit 56948b5

Please sign in to comment.