Browse Source

!1 修复im-server空指针bug

Merge pull request !1 from blue/v_1.0.0
master
blue 3 years ago
committed by Gitee
parent
commit
dc14e26b60
No known key found for this signature in database GPG Key ID: 173E9B9CA92EEF8F
  1. 12
      im-server/src/main/java/com/bx/imserver/websocket/WebsocketChannelCtxHolder.java

12
im-server/src/main/java/com/bx/imserver/websocket/WebsocketChannelCtxHolder.java

@ -18,16 +18,16 @@ public class WebsocketChannelCtxHolder {
}
public static void removeChannelCtx(Long userId){
channelMap.remove(userId);
if(userId != null){
channelMap.remove(userId);
}
}
public static ChannelHandlerContext getChannelCtx(Long userId){
if(userId == null){
return null;
}
return channelMap.get(userId);
}
public static Set<Long> getAllChannelIds(){
return channelMap.keySet();
}
}

Loading…
Cancel
Save