hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rahul Biswas (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HTTPASYNC-64) Race condition using CachingHttpAsyncClient
Date Thu, 09 Jan 2014 00:18:50 GMT
Rahul Biswas created HTTPASYNC-64:

             Summary: Race condition using CachingHttpAsyncClient
                 Key: HTTPASYNC-64
                 URL: https://issues.apache.org/jira/browse/HTTPASYNC-64
             Project: HttpComponents HttpAsyncClient
          Issue Type: Bug
    Affects Versions: 4.0 Final
         Environment: JDK 1.7, macbook pro
            Reporter: Rahul Biswas

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

In FutureHttpResponse the get() method has the following implementation - 
try {
        } 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". 

This message was sent by Atlassian JIRA

To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org

View raw message