shuffle Igtimi server list so a fail-over will eventually end up at a working server

Change-Id: Id29af12d9c57060b6a2d8463db2f3173f0762a03
This commit is contained in:
Axel Uhl committed 2016-04-19 00:18:22 +02:00
1 parent b62c21b1fd
commit 37158839b5
1 file changed
+1
@@ -501,6 +501,7 @@ public class IgtimiConnectionFactoryImpl implements IgtimiConnectionFactory {
result.add(uri);
}
// sort those to the front that don't do port 443 nor wss://
Collections.shuffle(result); // shuffle as a failover strategy
Collections.sort(result, new Comparator<URI>() {
@Override
public int compare(URI o1, URI o2) {