Commit 6ba8929a by 罗长华

Merge remote-tracking branch 'origin/feature-cluster' into feature-cluster

parents 07ffd8ee f7ffd02c
...@@ -32,7 +32,7 @@ public class UserStateCacheManager extends UserStateListener { ...@@ -32,7 +32,7 @@ public class UserStateCacheManager extends UserStateListener {
@Override @Override
public void onLineEvent(Long clientId, Integer platform, String longChannelId) { public void onLineEvent(Long clientId, Integer platform, String longChannelId) {
log.info("ws用户上线保存redis连接ip: {}, uid: {}", GetIpUtils.getlanIp(), longChannelId); log.info("ws用户上线保存redis连接clientId: {}, ip: {}, uid: {}", clientId, GetIpUtils.getlanIp(), longChannelId);
// 先删除旧的重复的platform // 先删除旧的重复的platform
Set<String> platformAndIps = redisUtils.getForSetMembers(getUserStateCacheKey(clientId)); Set<String> platformAndIps = redisUtils.getForSetMembers(getUserStateCacheKey(clientId));
for(String platformAndIp : platformAndIps) { for(String platformAndIp : platformAndIps) {
...@@ -48,7 +48,7 @@ public class UserStateCacheManager extends UserStateListener { ...@@ -48,7 +48,7 @@ public class UserStateCacheManager extends UserStateListener {
@Override @Override
public void offlineEvent(Long clientId, Integer platform, String longChannelId) { public void offlineEvent(Long clientId, Integer platform, String longChannelId) {
log.info("ws用户离线删除redis key,uid:" + longChannelId); log.info("ws用户离线删除redis key,uid: {}, clientId: {}", longChannelId, clientId);
redisUtils.removeForSet(getUserStateCacheKey(clientId), platform + RedisUtils.SPLIT + GetIpUtils.getlanIp()); redisUtils.removeForSet(getUserStateCacheKey(clientId), platform + RedisUtils.SPLIT + GetIpUtils.getlanIp());
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment