mirror of
https://github.com/vanitasvitae/Smack.git
synced 2024-11-26 14:02:06 +01:00
Fix ReconnectionManager RANDOM_INCREASING_DELAY policy
which was using the same value. Fixes SMACK-660.
This commit is contained in:
parent
e0bc1ccaf2
commit
a4be67ff5d
1 changed files with 4 additions and 2 deletions
|
@ -186,10 +186,12 @@ public class ReconnectionManager {
|
||||||
if (attempts > 13) {
|
if (attempts > 13) {
|
||||||
delay = randomBase * 6 * 5; // between 2.5 and 7.5 minutes (~5 minutes)
|
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 * 6; // between 30 and 90 seconds (~1 minutes)
|
||||||
}
|
}
|
||||||
|
else {
|
||||||
delay = randomBase; // 10 seconds
|
delay = randomBase; // 10 seconds
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
throw new AssertionError("Unknown reconnection policy " + reconnectionPolicy);
|
throw new AssertionError("Unknown reconnection policy " + reconnectionPolicy);
|
||||||
|
|
Loading…
Reference in a new issue