Ver Fonte

修复bug,设备断开移除redis中信息

syg há 3 anos atrás
pai
commit
33dc6aa1e7

+ 2 - 0
src/main/java/com/tidecloud/dataacceptance/service/AcceptanceInboundHandlerAdapter.java

@@ -264,6 +264,8 @@ public  class AcceptanceInboundHandlerAdapter extends ChannelInboundHandlerAdapt
 				String addressStr = ConnectMsg.ipToLong(this.ip);
 				String socketQueryKey = PREFIX_LINK + addressStr;
 				jedis.srem(socketQueryKey, socketId);
+				socketQueryKey = PREFIX_LINK_BACK + addressStr;
+				jedis.srem(socketQueryKey, deviceId);
 				jedis.del(deleteKey);
 				logger.info("delete link [{}] from redis and memory deviceId is [{}]", socketId, deviceId);
 			}