title: Calling numerous Android loopj AsyncHttpClient HEAD requests, just a random number of them is being executed
body: <p>As the title says, I'm having a strange issue with loopj's AsyncHttpClient.</p>
  
  <p>MyObject is a class that contains a link and a value and lista is a List containing 50 MyObject objects.</p>
  
  <p>I need to retrieve header information from 50 links, so I've made a cycle like this:</p>
  
  <pre><code>private static AsyncHttpClient client;
  
  
  public MyClass(){
      client = new AsyncHttpClient();
      client.setURLEncodingEnabled(true);
  }
  
  ....
  
  public void foo(List&lt;MyObject&gt; lista){
      for (final MyObject c : lista) {    
  
          client.head(c.getLink(), new AsyncHttpResponseHandler() {
              @Override
              public void onSuccess(int statusCode, org.apache.http.Header[] headers, byte[] responseBody) {
  
                  Log.d("DBG", "retrieving informations");
                  int contentlength = Integer.parseInt(headers[3].getValue());
                  c.setValue(contentLength);
  
                  Log.d("DBG", "retrivied");
  
                  setView(lista);
  
              }
  
              @Override
              public void onFailure(int statusCode, Header[] headers, byte[] responseBody, Throwable error) {
                  Log.d("DBG", "retrieving informations failed");
                  Log.d("DBG", error.toString());
              }
          });
      }
  }
  </code></pre>
  
  <p>At this point, if I try to exec the app and look at CatLog, I can see that just about 20 or 30 out of 50 request are executed, while the others do not give any feedback (i.e. no timeout exception, no "retrieving informations" debug message nor any other type of message).</p>
  
  <p>If I try to exec again the app, just about 7 or 8 requests will be executed.</p>
  
  <p>If I try to change anything in the code (for example adding a comment) and run it again, it even fails to install on the emulator with the following error:</p>
  
  <pre><code>[2014-03-05 02:46:28 - Myapp] Failed to install MyApp.apk on device 'emulator-5554!
  [2014-03-05 02:46:28 - MyApp] (null)
  [2014-03-05 02:46:28 - MyApp] Launch canceled!
  </code></pre>
  
  <p>Having said that removing the aforementioned piece of code everything else works well, I hope someone could help me to solve it.</p>
  
  <p>Any help would be apprecied.
  Really thank you in advance!</p>