diff options
author | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-14 02:59:56 +0300 |
---|---|---|
committer | Paul Sokolovsky <pfalcon@users.sourceforge.net> | 2014-10-14 02:59:56 +0300 |
commit | e002a024d66309b124651495fe423bf966b1c584 (patch) | |
tree | 10b22fa7645072b2661e7bbe4018f9a144edce02 /src | |
parent | cd5cc4fdbf4a4521669b80089d07498b23fd3889 (diff) |
Disable auto-retry for now.
It takes quite a lot of time for "connection timed out" errors.
Change-Id: I073a18b47e9c600b5979c37c9498be0b42917344
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/linaro/pubapi/LinaroPubAPIKey.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/linaro/pubapi/LinaroPubAPIKey.java b/src/main/java/linaro/pubapi/LinaroPubAPIKey.java index 79a5f55..e6cfb2c 100644 --- a/src/main/java/linaro/pubapi/LinaroPubAPIKey.java +++ b/src/main/java/linaro/pubapi/LinaroPubAPIKey.java @@ -92,9 +92,13 @@ public class LinaroPubAPIKey extends Builder { method.setRequestHeader("AuthToken", getDescriptor().getPubAPISecretKey()); method.addParameter("expires", "18000"); // 5hrs - // Auto-retry few times on some (connection) errors + // Auto-retry once on some (connection) errors + // Note: for some connection issues, there's very long timeouts, so + // having anything more than 1 here contradicts "fail fast" approach. + // Disable auto-retry altogether for now - note that there's autoretry + // by default. method.getParams().setParameter(HttpMethodParams.RETRY_HANDLER, - new DefaultHttpMethodRetryHandler(3, false)); + new DefaultHttpMethodRetryHandler(0, false)); String token = null; try { |