Uploaded image for project: 'HttpComponents HttpClient'
  1. HttpComponents HttpClient
  2. HTTPCLIENT-1298

Unable to shutdown executor service used by AsynchronousValidator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 4.2.3
    • 4.3 Beta1
    • HttpCache
    • None

    Description

      Currently there is no way to tell the CachingHttpClient to shutdown the executor service used by its AsynchronousValidator. This could lead to a resource leak, but probably only in cases when the threads weren't reclaimed by the thread pool. So only when it is actually processing tasks. As long as the thread pool isn't used, it won't create threads.

      From an application life-cycle point of view there should be a way to explicitly tell the HttpClient to shutdown and release all resources now regardless whether there are any outstanding validation requests or not.

      I have a patch against version 4.2.1 which in fact adds a shutdown() method to the HttpClient and the AsynchronousValidator. Today I saw, there is already a CloseableHttpClient. So do you need any contribution to fix this? Looks like there is already a plan for that.

      Btw: thanks for already supporting the background validation via the stale-while-revalidate header.

      Attachments

        Activity

          People

            Unassigned Unassigned
            mmeinhold Martin Meinhold [Atlassian]
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: