Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Code cleanup.

  • Loading branch information...
commit a8df94c3df039772a7e031cc77d7e804c357e111 1 parent 2dfd83c
@iced iced authored
Showing with 7 additions and 9 deletions.
  1. +7 −9 client/src/main/java/io/iron/ironworker/client/APIClient.java
View
16 client/src/main/java/io/iron/ironworker/client/APIClient.java
@@ -127,21 +127,19 @@ private HttpResponse doRequestExecute(HttpRequestBase request) throws APIExcepti
if (response.getStatusLine().getStatusCode() != 503) {
return response;
}
-
- try {
- Thread.sleep((long)(Math.pow(4, currentTry) * 100 * Math.random()));
- } catch (InterruptedException e) {
- if (currentTry == maxRetries - 1) {
- throw new APIException(null, e);
- }
- }
} catch (IOException e) {
if (currentTry == maxRetries - 1) {
throw new APIException(null, e);
}
}
- currentTry += 1;
+ try {
+ Thread.sleep((long)(Math.pow(4, currentTry) * 100 * Math.random()));
+ } catch (InterruptedException e) {
+ throw new APIException(null, e);
+ }
+
+ currentTry++;
}
return response;
Please sign in to comment.
Something went wrong with that request. Please try again.