back_recharge
zhangshanxue 2019-09-18 18:38:43 +08:00
commit 04531d5128
1 changed files with 10 additions and 0 deletions

View File

@ -9,7 +9,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Date;
import java.util.HashSet;
import java.util.Map;
import java.util.Set;
import java.util.concurrent.ConcurrentHashMap;
public class RetrySendIndicationThread extends Thread{
@ -39,7 +41,12 @@ public class RetrySendIndicationThread extends Thread{
return;
}
long now = TimeUtils.now();
Set<Integer> removeIds = new HashSet<>();
for(ISession session : sessionMap.values()){
if(session.getCtx() == null || session.getCtx().channel() == null){
removeIds.add(session.getUid());
continue;
}
if(session.getFiveReady() == 1 && session.getFiveByteBuf()!=null){
session.putBackIndicationToMap(MessageTypeProto.MessageType.FIVE_PLAYER_REFLUSH_INDICATION_VALUE,session.getFiveByteBuf());
session.setFiveByteBuf(null);
@ -54,5 +61,8 @@ public class RetrySendIndicationThread extends Thread{
}
}
}
for(Integer removeId:removeIds ){
OnlineUserManager.sessionMap.remove(removeId);
}
}
}