修改key

This commit is contained in:
ascrutae 2016-06-02 10:28:00 +08:00
parent c1d3407df1
commit 1018981f73
1 changed files with 1 additions and 2 deletions

View File

@ -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
}
}
/**
* 生成校验和参数
*