Merge pull request #1309 from IanCao/fixbug2

FIX #1308
This commit is contained in:
Fury Zhu 2019-06-04 16:09:30 +08:00 committed by GitHub
commit f2c061040c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -74,7 +74,7 @@ public class ServerListManager {
GlobalExecutor.registerServerStatusReporter(new ServerStatusReporter(), 5000); GlobalExecutor.registerServerStatusReporter(new ServerStatusReporter(), 5000);
} }
public List<Server> refreshServerList() { private List<Server> refreshServerList() {
List<Server> result = new ArrayList<>(); List<Server> result = new ArrayList<>();
@ -111,12 +111,12 @@ public class ServerListManager {
String ip; String ip;
int port; int port;
if (serverList.get(0).contains(UtilsAndCommons.IP_PORT_SPLITER)) { String server = serverList.get(i);
if (server.contains(UtilsAndCommons.IP_PORT_SPLITER)) {
ip = serverList.get(i).split(UtilsAndCommons.IP_PORT_SPLITER)[0]; ip = server.split(UtilsAndCommons.IP_PORT_SPLITER)[0];
port = Integer.parseInt(serverList.get(i).split(UtilsAndCommons.IP_PORT_SPLITER)[1]); port = Integer.parseInt(server.split(UtilsAndCommons.IP_PORT_SPLITER)[1]);
} else { } else {
ip = serverList.get(i); ip = server;
port = RunningConfig.getServerPort(); port = RunningConfig.getServerPort();
} }