1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2024-12-23 04:57:58 +01:00

Fix ReconnectionManager RANDOM_INCREASING_DELAY policy

which was using the same value. Fixes SMACK-660.
This commit is contained in:
Florian Schmaus 2015-04-27 17:32:20 +02:00
parent e0bc1ccaf2
commit a4be67ff5d

View file

@ -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);