redis 缓存服务器地址

master
zhangshanxue 2019-09-17 15:22:01 +08:00
parent 4b0be8a6a7
commit 151329741a
2 changed files with 3 additions and 3 deletions

View File

@ -57,7 +57,7 @@ public class MsgController {
throw new Exception("serverAddress not exist");
}
String thriftIp = rpcString.split(":")[0];
String thriftPort = String.valueOf(7901);
String thriftPort = rpcString.split(":")[1];
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
return -1;
} else {

View File

@ -114,7 +114,7 @@ public class GMHandler extends BaseHandler {
continue;
}
String thriftIp = rpcString.split(":")[0];
String thriftPort = String.valueOf(7901);
String thriftPort = rpcString.split(":")[1];
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
continue;
} else {
@ -142,7 +142,7 @@ public class GMHandler extends BaseHandler {
throw new Exception("serverAddress not exist");
}
String thriftIp = rpcString.split(":")[0];
String thriftPort = String.valueOf(7900 + 1);
String thriftPort = rpcString.split(":")[1];
if (thriftIp == null || thriftIp.isEmpty() || null == thriftPort || thriftPort.isEmpty()) {
throw new Exception("serverAddress not exist");
} else {