Browse Source

Merge branch 'master' of http://git.fast-fun.cn:92/ruili/zk-station-server

 Conflicts:
	src/main/java/com/zhili/zkstationserver/handler/StationMessageHandler.java
zhaoyuanqi 2 years ago
parent
commit
f523e32a77

+ 5 - 2
src/main/java/com/zhili/zkstationserver/handler/StationMessageHandler.java

@@ -117,8 +117,11 @@ public class StationMessageHandler extends ChannelInboundHandlerAdapter {
                 stationRegisterkeys.add("StationConn:" + stationCode);
                 registerSuccess = (Long) redisTemplate.execute(stationRegisterScript, stationRegisterkeys, stationConnInfo, 15);
 //                stationMessageReply = new StationMessage();
-                if (registerSuccess.equals(0L)) {
-                    //成功
+                if (registerSuccess.equals(0l)) {
+                    //回复成功
+                    stationMessageReply = new StationMessage();
+                    stationMessageReply.setCommand(404);
+                    stationMessageReply.setData(new byte[1]);
                 } else {
                     //注册失败,有可能已经有站注册了,一个站只能有一个连接,关闭
                     log.info("心跳失败,stationCode:{}", stationCode);