0

I have two different domain urls named A.com and B.com. This is the code to send request: the asyncHttpClient is the same one.

asyncHttpClient.post(context, "A.com", aParams, aResponseHandler);
asyncHttpClient.post(context, "B.com", bParams, bRsponseHandler);

There is a chance to happen: get "B.com" response in aResponseHandler, although it doesn't happen frequently. Why does it mistake the response ?

Whehter i perform either of them solely, it's ok.

I find another guy has the same question.

gustavo
  • 141
  • 1
  • 10

1 Answers1

0

The issue you linked on github seems to be closed. The original poster wrote the following:

in my local tests ,no way to reproduce this problem, but truly happened.....

It seems unlikely that this would occur, and the issue cannot be reproduced. Personally, I wouldn't worry about this happening in your application. You could write a conditional statement to check and throw an exception if the wrong ResponseHandler is triggered.

Parsa
  • 3,054
  • 3
  • 19
  • 35
  • Thanks for your answer. But it will happen. I have some logs in 'onSuccess' of the ResponseHandler to find the question. `MyLog.i(" request =" + getRequestURI().toString() +" responseString=" + responseString );` The requestURI is not match with the responseString. – gustavo Jul 09 '15 at 02:41