diff --git a/.idea/compiler.xml b/.idea/compiler.xml
index 8bc19c7..902b116 100644
--- a/.idea/compiler.xml
+++ b/.idea/compiler.xml
@@ -14,6 +14,7 @@
+
diff --git a/.idea/encodings.xml b/.idea/encodings.xml
index 60bcd90..31ce7e1 100644
--- a/.idea/encodings.xml
+++ b/.idea/encodings.xml
@@ -5,6 +5,8 @@
+
+
diff --git a/.idea/misc.xml b/.idea/misc.xml
index 831be57..11b353a 100644
--- a/.idea/misc.xml
+++ b/.idea/misc.xml
@@ -11,6 +11,7 @@
+
diff --git a/game_common/src/main/java/com/game/data/Player.java b/game_common/src/main/java/com/game/data/Player.java
index c0125f0..ffdd407 100644
--- a/game_common/src/main/java/com/game/data/Player.java
+++ b/game_common/src/main/java/com/game/data/Player.java
@@ -415,6 +415,7 @@ public class Player {
public void sendEvent(String cmd, ITObject param) {
if (!this.isConnect)
return;
+ Global.logger.info("user ip:"+this.sender.getAddress());
MainServer.instance.sendEvent(cmd, param, this.sender);
}
diff --git a/game_common/target/classes/com/game/data/Player.class b/game_common/target/classes/com/game/data/Player.class
index 0d900c0..9bbe366 100644
Binary files a/game_common/target/classes/com/game/data/Player.class and b/game_common/target/classes/com/game/data/Player.class differ
diff --git a/game_common/target/game_common-1.0.0.jar b/game_common/target/game_common-1.0.0.jar
index 0c77411..75ded16 100644
Binary files a/game_common/target/game_common-1.0.0.jar and b/game_common/target/game_common-1.0.0.jar differ
diff --git a/web_group/src/main/java/com/group/service/GroupRoomService.java b/web_group/src/main/java/com/group/service/GroupRoomService.java
index 0349646..b849c1b 100644
--- a/web_group/src/main/java/com/group/service/GroupRoomService.java
+++ b/web_group/src/main/java/com/group/service/GroupRoomService.java
@@ -1071,8 +1071,8 @@ public class GroupRoomService {
String gameId1 = jedis11.hget("g{383709}:play:"+pid,"gameId");
String robot_host = null;
if(StringUtil.isNotEmpty(gameId1)) {
- if (Integer.parseInt(gameId1) == 10) {
- robot_host = "8.138.120.132:8701";
+ if (Integer.parseInt(gameId1) == 17) {
+ robot_host = "8.138.120.132:8917";
}
if (Integer.parseInt(gameId1) == 22) {
robot_host = "8.138.120.132:8722";
@@ -1102,17 +1102,19 @@ public class GroupRoomService {
*/
public static ITObject sendRobotData(String roomid,int groupid,String robot_host,int gameId){
- Jedis js1 = Redis.use("group1_db3").getJedis();
+ //Jedis js1 = Redis.use("group1_db3").getJedis();
+
- String flag = js1.get("roomsend"+roomid);
- if(flag!=null){
- return null;
- }
log.info("sendRobotData :"+roomid+"groupid:"+groupid+"robot_host:"+robot_host);
CompletableFuture future = CompletableFuture.supplyAsync(() -> {
// 执行任务
- //Jedis js1 = Redis.use("group1_db2").getJedis();
+ Jedis js1 = Redis.use("group1_db3").getJedis();
+ String flag = js1.get("roomsend"+roomid);
+ if(flag!=null){
+ js1.close();
+ return null;
+ }
js1.set("roomsend"+roomid,1+"");
js1.expire("roomsend"+roomid,5);
try {
@@ -1133,6 +1135,7 @@ public class GroupRoomService {
int robotid = 0;
//
Set jsRobot = js1.smembers("robots");
+
String wokelock = "wokelock";
for (String key : jsRobot) {
String tmp = js1.get(wokelock+key);
@@ -1145,7 +1148,7 @@ public class GroupRoomService {
js1.set(wokelock+robotid, String.valueOf(1));
js1.expire(wokelock+robotid,2);
TaurusClient client = new TaurusClient(robot_host, "games"+robotid, TaurusClient.ConnectionProtocol.Tcp);
- client.setSession("abbccccd");
+ client.setSession("abbccccd"+robotid+roomid);
client.connect();
sleep(1500);
ITObject params = TObject.newInstance();
@@ -1165,6 +1168,7 @@ public class GroupRoomService {
}
eventThread.yield();
log.info("sendRobotData :"+roomid+"robotid:"+robotid);
+ js1.close();
}catch (Exception e){
js1.close();
}finally {
diff --git a/web_group/target/ROOT.war b/web_group/target/ROOT.war
index fe67441..c50d09c 100644
Binary files a/web_group/target/ROOT.war and b/web_group/target/ROOT.war differ
diff --git a/web_group/target/ROOT/WEB-INF/classes/com/group/service/GroupRoomService.class b/web_group/target/ROOT/WEB-INF/classes/com/group/service/GroupRoomService.class
index 4d7c4fe..dc69016 100644
Binary files a/web_group/target/ROOT/WEB-INF/classes/com/group/service/GroupRoomService.class and b/web_group/target/ROOT/WEB-INF/classes/com/group/service/GroupRoomService.class differ
diff --git a/web_group/target/classes/com/group/service/GroupRoomService.class b/web_group/target/classes/com/group/service/GroupRoomService.class
index 4d7c4fe..dc69016 100644
Binary files a/web_group/target/classes/com/group/service/GroupRoomService.class and b/web_group/target/classes/com/group/service/GroupRoomService.class differ