Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
4.0 Final
-
JDK 1.7, macbook pro
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
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".