修改key
This commit is contained in:
parent
c1d3407df1
commit
1018981f73
|
|
@ -29,7 +29,7 @@ public class CollectionServerDataHandler extends SimpleChannelInboundHandler<byt
|
|||
DataBufferThreadContainer.getDataBufferThread().saveTemporarily(data.getBytes());
|
||||
} else {
|
||||
InetSocketAddress socketAddress = (InetSocketAddress) ctx.channel().localAddress();
|
||||
String key = socketAddress.getHostName() + ":" + socketAddress.getPort();
|
||||
String key = ctx.name() + "-" + socketAddress.getHostName() + ":" + socketAddress.getPort();
|
||||
Jedis jedis = AlarmRedisConnector.getJedis();
|
||||
// 如果不存在,则置为0,并且设置生失效时间
|
||||
if (jedis.setnx(key, 0 + "") == 1) {
|
||||
|
|
@ -44,7 +44,6 @@ public class CollectionServerDataHandler extends SimpleChannelInboundHandler<byt
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 生成校验和参数
|
||||
*
|
||||
|
|
|
|||
Loading…
Reference in New Issue