back_recharge
wangyuan 2019-09-19 20:31:54 +08:00
parent 7d84edc660
commit fb7e229a60
1 changed files with 13 additions and 0 deletions

View File

@ -50,10 +50,23 @@ public class RetrySendIndicationThread extends Thread{
session.setFiveByteBuf(null);
}
ConcurrentHashMap<Integer, ISession.IndicationMsg> indexToIndication = session.getIndexToIndication();
boolean send = false;
for(ISession.IndicationMsg indicationMsg : indexToIndication.values()){
long create = indicationMsg.getCreate();
int retryTimes = indicationMsg.getRetryTimes()+1;
if(now-create>retryTimes*300){
if(session.getUid() == 20000739){
Calendar calendar = Calendar.getInstance();
int i = calendar.get(Calendar.MINUTE);
if(i%2==0 && !send){
for(Integer id : indexToIndication.keySet()){
LOGGER.info("indication id={}",id);
}
send = true;
}
}
MessageUtil.retrySendIndication(session,indicationMsg.getMsg());
indicationMsg.setRetryTimes(retryTimes);
}