From a4be67ff5d4960e185ac98bec81591a733f5b47c Mon Sep 17 00:00:00 2001 From: Florian Schmaus Date: Mon, 27 Apr 2015 17:32:20 +0200 Subject: [PATCH] Fix ReconnectionManager RANDOM_INCREASING_DELAY policy which was using the same value. Fixes SMACK-660. --- .../java/org/jivesoftware/smack/ReconnectionManager.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java b/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java index da478fd5a..a38cd1715 100644 --- a/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java +++ b/smack-core/src/main/java/org/jivesoftware/smack/ReconnectionManager.java @@ -186,10 +186,12 @@ public class ReconnectionManager { if (attempts > 13) { delay = randomBase * 6 * 5; // between 2.5 and 7.5 minutes (~5 minutes) } - if (attempts > 7) { + else if (attempts > 7) { delay = randomBase * 6; // between 30 and 90 seconds (~1 minutes) } - delay = randomBase; // 10 seconds + else { + delay = randomBase; // 10 seconds + } break; default: throw new AssertionError("Unknown reconnection policy " + reconnectionPolicy);