Skip to content

Commit

Permalink
fixed: Ensure that the DnsNameResolver is closed when the AlgoliaClie…
Browse files Browse the repository at this point in the history
…nt is. (#511)

Close #500
  • Loading branch information
aseure authored and Ant-hem committed Jan 8, 2019
1 parent 45fd1ee commit 9c25f35
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/scala/algolia/AlgoliaHttpClient.scala
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,10 @@ case class AlgoliaHttpClient(

implicit val formats: Formats = AlgoliaDsl.formats

def close(): Unit = _httpClient.close()
def close(): Unit = {
dnsNameResolver.close()
_httpClient.close()
}

def request[T: Manifest](host: String, headers: Map[String, String], payload: HttpPayload)(
implicit executor: ExecutionContext): Future[T] = {
Expand Down

0 comments on commit 9c25f35

Please sign in to comment.