From 59ccc88c73ed944bc9bfd56bd4498601a1b2fc37 Mon Sep 17 00:00:00 2001 From: javanna Date: Wed, 20 Jul 2016 16:24:57 +0200 Subject: [PATCH] rename mustRetry method to mayRetry --- .../src/main/java/org/elasticsearch/client/RestClient.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/client/rest/src/main/java/org/elasticsearch/client/RestClient.java b/client/rest/src/main/java/org/elasticsearch/client/RestClient.java index 95f6bc136d2..32d608e385f 100644 --- a/client/rest/src/main/java/org/elasticsearch/client/RestClient.java +++ b/client/rest/src/main/java/org/elasticsearch/client/RestClient.java @@ -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: