提交 12de4b87 编写于 作者: Y youyong205

fix bug

上级 2bd9b79e
......@@ -87,9 +87,9 @@ public class ChannelManager implements Task {
String serverConfig = loadServerConfig();
if (serverConfig != null) {
List<InetSocketAddress> newAddress = parseSocketAddress(serverConfig);
List<InetSocketAddress> configedAddresses = parseSocketAddress(serverConfig);
initChannel(newAddress, serverConfig);
initChannel(configedAddresses, serverConfig);
} else {
initChannel(serverAddresses, null);
}
......
......@@ -57,7 +57,7 @@ public class RouterConfigManager implements Initializable, LogEnabled {
Map<Server, Integer> map = new HashMap<Server, Integer>();
List<Server> servers = queryEnableServers();
int length = servers.size();
int index = (int) (Math.random() * length);
int index = domain.hashCode() * length;
for (int i = 0; i < 2; i++) {
map.put(servers.get((index + 1) % length), 0);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册