|
@@ -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);
|