Merge branch 'master' of http://60.1.1.230/backend/jieling_server
commit
04531d5128
|
@ -9,7 +9,9 @@ import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
import java.util.HashSet;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
import java.util.Set;
|
||||||
import java.util.concurrent.ConcurrentHashMap;
|
import java.util.concurrent.ConcurrentHashMap;
|
||||||
|
|
||||||
public class RetrySendIndicationThread extends Thread{
|
public class RetrySendIndicationThread extends Thread{
|
||||||
|
@ -39,7 +41,12 @@ public class RetrySendIndicationThread extends Thread{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
long now = TimeUtils.now();
|
long now = TimeUtils.now();
|
||||||
|
Set<Integer> removeIds = new HashSet<>();
|
||||||
for(ISession session : sessionMap.values()){
|
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){
|
if(session.getFiveReady() == 1 && session.getFiveByteBuf()!=null){
|
||||||
session.putBackIndicationToMap(MessageTypeProto.MessageType.FIVE_PLAYER_REFLUSH_INDICATION_VALUE,session.getFiveByteBuf());
|
session.putBackIndicationToMap(MessageTypeProto.MessageType.FIVE_PLAYER_REFLUSH_INDICATION_VALUE,session.getFiveByteBuf());
|
||||||
session.setFiveByteBuf(null);
|
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