Uploaded image for project: 'HttpComponents HttpAsyncClient'
  1. HttpComponents HttpAsyncClient
  2. HTTPASYNC-64

Race condition using CachingHttpAsyncClient

    XMLWordPrintableJSON

Details

    Description

      Running into a race condition when using CachingHttpAsyncClient. The async client at times returns null from the FutureHttpResponse obtained from CachingHttpAsyncClient.execute(HttpGet, null)

      In FutureHttpResponse the get() method has the following implementation -
      try

      { getDelegate().get(); }

      catch (ExecutionException e)

      { // ignore }

      final HttpResponse result = getResponse();

      When the getDelegate().get(); returns, the getResponse() returns null. It seems the thread doing the actual request/response processing still hasn't called "setResponse".

      Attachments

        Activity

          People

            Unassigned Unassigned
            rbiswas Rahul
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: