# How do i close async high level rest client

**URL:** <https://discuss.elastic.co/t/how-do-i-close-async-high-level-rest-client/243289>\
**Category:** Elasticsearch\
**Tags:** language-clients\
**Created:** [July 30, 2020, 10:32pm UTC](https://discuss.elastic.co/t/how-do-i-close-async-high-level-rest-client/243289 "2020-07-30T22:32:52Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![prutum](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/prutum/32/48977_2.png) [@prutum](https://discuss.elastic.co/u/prutum)\
**Post date:** [July 30, 2020, 10:32pm UTC](https://discuss.elastic.co/t/how-do-i-close-async-high-level-rest-client/243289/1 "2020-07-30T22:32:52Z")

</div>

Hi,

I am using Async high level rest client. I am pushing 400 requests to elastic search using async client. It is performant and gives me good parallelization. However I am not able to figure out how to close the client? If I do client.close(), the asycn requests that are still in pipeline fail. Can someone guide me if its important to close the async client or any method to close it once all my async requests are over

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [August 3, 2020, 10:31am UTC](https://discuss.elastic.co/t/how-do-i-close-async-high-level-rest-client/243289/2 "2020-08-03T10:31:42Z")

</div>

Hey,

judging from a super quick peek at the source, the apache http client connection manager is closed with a 2 second delay, and does not wait for anything after that. Unless there is no other reply coming in here from a developer, opening a github issue about this might make sense.

Thanks!

--Alex

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [August 31, 2020, 10:31am UTC](https://discuss.elastic.co/t/how-do-i-close-async-high-level-rest-client/243289/3 "2020-08-31T10:31:46Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
