Skip to content

Commit 2efb8db

Browse files
committed
UnknownHostException was not caught by whitelist in RetryHandler, Closing android-async-http#713
1 parent 24dfe25 commit 2efb8db

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ private void makeRequestWithRetries() throws IOException {
183183
// while the WI-FI is initialising. The retry logic will be invoked here, if this is NOT the first retry
184184
// (to assist in genuine cases of unknown host) which seems better than outright failure
185185
cause = new IOException("UnknownHostException exception: " + e.getMessage());
186-
retry = (executionCount > 0) && retryHandler.retryRequest(cause, ++executionCount, context);
186+
retry = (executionCount > 0) && retryHandler.retryRequest(e, ++executionCount, context);
187187
} catch (NullPointerException e) {
188188
// there's a bug in HttpClient 4.0.x that on some occasions causes
189189
// DefaultRequestExecutor to throw an NPE, see

0 commit comments

Comments
 (0)