Skip to content

Commit cebd029

Browse files
committed
android-async-http#88 uncatched exception
1 parent 624be66 commit cebd029

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

library/src/com/loopj/android/http/AsyncHttpRequest.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
package com.loopj.android.http;
2020

2121
import org.apache.http.HttpResponse;
22+
import org.apache.http.client.ClientProtocolException;
2223
import org.apache.http.client.HttpRequestRetryHandler;
2324
import org.apache.http.client.methods.HttpUriRequest;
2425
import org.apache.http.conn.ConnectTimeoutException;
@@ -102,6 +103,11 @@ private void makeRequestWithRetries() throws ConnectException {
102103
try {
103104
makeRequest();
104105
return;
106+
} catch (ClientProtocolException e) {
107+
if(responseHandler != null) {
108+
responseHandler.sendFailureMessage(e, "cannot repeat the request");
109+
}
110+
return;
105111
} catch (UnknownHostException e) {
106112
if (responseHandler != null) {
107113
responseHandler.sendFailureMessage(e, "can't resolve host");

0 commit comments

Comments
 (0)