Added extra checks to see if they help server duplication
This commit is contained in:
@@ -4279,7 +4279,7 @@ public class Blocks{
|
||||
hitSize = 7f;
|
||||
shootEffect = sfe;
|
||||
smokeEffect = Fx.shootBigSmoke;
|
||||
ammoMultiplier = 1;
|
||||
ammoMultiplier = 2;
|
||||
reloadMultiplier = 1f;
|
||||
pierceCap = 4;
|
||||
pierce = true;
|
||||
|
||||
@@ -680,6 +680,8 @@ public class JoinDialog extends BaseDialog{
|
||||
|
||||
Http.get(urls[index])
|
||||
.error(t -> {
|
||||
if(fetchedServers) return;
|
||||
|
||||
if(index < urls.length - 1){
|
||||
//attempt fetching from the next URL upon failure
|
||||
fetchServers(urls, index + 1);
|
||||
@@ -688,10 +690,14 @@ public class JoinDialog extends BaseDialog{
|
||||
}
|
||||
})
|
||||
.submit(result -> {
|
||||
if(fetchedServers) return;
|
||||
|
||||
String text = result.getResultAsString();
|
||||
Seq<ServerGroup> servers = parseServerString(text);
|
||||
//modify default servers on main thread
|
||||
Core.app.post(() -> {
|
||||
if(fetchedServers) return;
|
||||
|
||||
//cache the server list to a file, so it can be loaded in case of an outage later
|
||||
try{
|
||||
serverCacheFile.writeString(text);
|
||||
|
||||
Reference in New Issue
Block a user