rename mustRetry method to mayRetry

This commit is contained in:
javanna 2016-07-20 16:24:57 +02:00 committed by Luca Cavanna
parent fccfe7dcb8
commit 59ccc88c73
1 changed files with 2 additions and 2 deletions

View File

@ -300,7 +300,7 @@ public final class RestClient implements Closeable {
listener.onSuccess(response);
} else {
ResponseException responseException = new ResponseException(response);
if (mustRetry(statusCode)) {
if (mayRetry(statusCode)) {
//mark host dead and retry against next one
onFailure(host);
retryIfPossible(responseException, hosts, request);
@ -437,7 +437,7 @@ public final class RestClient implements Closeable {
return statusCode < 300 || (HttpHead.METHOD_NAME.equals(method) && statusCode == 404);
}
private static boolean mustRetry(int statusCode) {
private static boolean mayRetry(int statusCode) {
switch(statusCode) {
case 502:
case 503: