blue
3 years ago
committed by
Gitee
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
1 changed files with
6 additions and
6 deletions
-
im-server/src/main/java/com/bx/imserver/websocket/WebsocketChannelCtxHolder.java
|
|
@ -18,16 +18,16 @@ public class WebsocketChannelCtxHolder { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
public static void removeChannelCtx(Long userId){ |
|
|
public static void removeChannelCtx(Long userId){ |
|
|
|
|
|
if(userId != null){ |
|
|
channelMap.remove(userId); |
|
|
channelMap.remove(userId); |
|
|
} |
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public static ChannelHandlerContext getChannelCtx(Long userId){ |
|
|
public static ChannelHandlerContext getChannelCtx(Long userId){ |
|
|
return channelMap.get(userId); |
|
|
if(userId == null){ |
|
|
|
|
|
return null; |
|
|
} |
|
|
} |
|
|
|
|
|
return channelMap.get(userId); |
|
|
public static Set<Long> getAllChannelIds(){ |
|
|
|
|
|
return channelMap.keySet(); |
|
|
|
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
} |
|
|
|