-
Notifications
You must be signed in to change notification settings - Fork 4.1k
null and consequently crash on RetryHandler #137
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I have met the same problem. When the server is not running, a HttpHostConnectException occured. And the program goes into RetryHandler. The program was blocked at the same place as forcewill mentioned earlier. I modified the code as below and resolved the problem. But I don't know whether is it correct. if(retry) {
// resend all idempotent requests
HttpUriRequest currentReq = (HttpUriRequest) context.getAttribute( ExecutionContext.HTTP_REQUEST );
if(currentReq != null){
String requestType = currentReq.getMethod();
retry = !requestType.equals("POST");
}
} |
That was exactly my fix and i don't know if it's correct also, it seems context.getAttribute( ExecutionContext.HTTP_REQUEST ); isn't supposed to return null ? |
meet the same problem as emerson-zhang's, too ,my program is also blocked by this problem |
same issue here, currentReq is null, therefore currentReq.getMethod() silently crashes... |
Issue was partially modified in 6389fa9, I will commit in a moment full fix |
# By mareksebera (7) and Ankush Sachdeva (1) # Via Ankush Sachdeva (1) and Marek Sebera (1) * 'master' of https://github.com/loopj/android-async-http: Added Proxy Authentication ; fixes android-async-http#328 Fixed wrong static field, Closing android-async-http#229 Manual merge, Closing android-async-http#269, android-async-http#118, Closing android-async-http#10, Closing android-async-http#127, android-async-http#154 Closes android-async-http#137 Removing duplicate call Closing android-async-http#179 Updated Gradle Android tools version Cleaning up error message output
in
currentReq returned is null and so the the currentReq.getMethod() crashs, leaving my application on a blocking state due to the fact that im waiting on the listeners to be invoked.
This happens for example if my Device is on Wi-Fi but with no internet connectivity
The text was updated successfully, but these errors were encountered: