Skip to content

Commit 26a41f0

Browse files
author
Oriental Sensation
committed
Switched the check in order to allow users to override the blacklist, if they wish to.
1 parent c53f350 commit 26a41f0

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

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

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,12 @@ public boolean retryRequest(IOException exception, int executionCount, HttpConte
7575
if (executionCount > maxRetries) {
7676
// Do not retry if over max retry count
7777
retry = false;
78-
} else if (isInList(exceptionBlacklist, exception)) {
79-
// immediately cancel retry if the error is blacklisted
80-
retry = false;
8178
} else if (isInList(exceptionWhitelist, exception)) {
8279
// immediately retry if error is whitelisted
8380
retry = true;
81+
} else if (isInList(exceptionBlacklist, exception)) {
82+
// immediately cancel retry if the error is blacklisted
83+
retry = false;
8484
} else if (!sent) {
8585
// for most other errors, retry only if request hasn't been fully sent yet
8686
retry = true;
@@ -121,4 +121,4 @@ protected boolean isInList(HashSet<Class<?>> list, Throwable error) {
121121
}
122122
return false;
123123
}
124-
}
124+
}

0 commit comments

Comments
 (0)