mirror of
https://gitee.com/xchao/j-im.git
synced 2024-12-05 05:17:35 +08:00
fix: 解决监听器无法回调的问题
This commit is contained in:
parent
7b01686c99
commit
3a663dfd05
@ -369,7 +369,6 @@ public class ImAio {
|
||||
* @param bindListener(解绑定监听器回调)
|
||||
*/
|
||||
public static void unbindUser(String userId,ImBindListener bindListener){
|
||||
Aio.unbindUser(imConfig.getGroupContext(), userId);
|
||||
if(bindListener != null){
|
||||
try {
|
||||
SetWithLock<ChannelContext> userChannelContexts = ImAio.getChannelContextsByUserId(userId);
|
||||
@ -381,7 +380,7 @@ public class ImAio {
|
||||
try{
|
||||
Set<ChannelContext> channels = userChannelContexts.getObj();
|
||||
for(ChannelContext channelContext : channels){
|
||||
bindListener.onAfterUserBind(channelContext, userId);
|
||||
bindListener.onAfterUserUnbind(channelContext, userId);
|
||||
}
|
||||
}finally{
|
||||
readLock.unlock();
|
||||
@ -390,6 +389,7 @@ public class ImAio {
|
||||
log.error(e.toString(),e);
|
||||
}
|
||||
}
|
||||
Aio.unbindUser(imConfig.getGroupContext(), userId);
|
||||
}
|
||||
/**
|
||||
* 绑定群组;
|
||||
|
Loading…
Reference in New Issue
Block a user