fix retry
parent
b84afdf49a
commit
5bfaaea4b6
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue